Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#40609 - [systemd] daemon-reload doesn't appear to reload timers

Attached to Project: Arch Linux
Opened by Leeman (alaricljs) - Friday, 30 May 2014, 15:06 GMT
Last edited by Dave Reisner (falconindy) - Friday, 30 May 2014, 16:51 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Dave Reisner (falconindy)
Tom Gundersen (tomegun)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

systemctl daemon-reload has no effect after an edit of a timer file:


Additional info:

systemd 212-3


Steps to reproduce:
create a timer file with a messed up OnCalendar, enable it and get this:
May 30 10:54:09 systemd[1]: [/etc/systemd/system/timer-2am-daily.timer:7] Failed to parse calendar specification, ignoring: *-*-*02:00:00

Fix it, systemctl daemon-reload, same result in spite of a different OnCalendar being in the file the logs stays the same down to the timestamp, nothing is being done with the new timer file at all.

This task depends upon

Closed by  Dave Reisner (falconindy)
Friday, 30 May 2014, 16:51 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Nothing to do here.
Comment by Leeman (alaricljs) - Friday, 30 May 2014, 15:07 GMT
also, systemctl daemon-reexec didn't change anything either.
Comment by Dave Reisner (falconindy) - Friday, 30 May 2014, 15:53 GMT
Works for me. Your instructions don't replicate the problem. Re-enabling the timer after fixing it and reloading systemd results in a loaded timer.
Comment by Leeman (alaricljs) - Friday, 30 May 2014, 16:09 GMT
[root@xen system]# pwd
/etc/systemd/system
[root@xen system]# cat timer-2am-daily.timer
[Unit]
Description=2AM Daily Timer
RefuseManualStart=true
RefuseManualStop=true

[Timer]
OnCalendar=*-*-* 02:00:00
#Persistent=true
Unit=timer-2am-daily.target

[Install]
WantedBy=multi-user.target
[root@xen system]# systemctl daemon-reload
[root@xen system]# systemctl status timer-2am-daily.timer -l
* timer-2am-daily.timer - 2AM Daily Timer
Loaded: loaded (/etc/systemd/system/timer-2am-daily.timer; enabled)
Active: inactive (dead)

May 30 10:54:09 xen systemd[1]: [/etc/systemd/system/timer-2am-daily.timer:7] Failed to parse calendar specification, ignoring: "*-*-*02:00:00
May 30 10:54:09 xen systemd[1]: timer-2am-daily.timer lacks value setting. Refusing.
May 30 10:55:46 xen systemd[1]: [/etc/systemd/system/timer-2am-daily.timer:7] Failed to parse calendar specification, ignoring: "*-*-*02:00:00
May 30 10:55:46 xen systemd[1]: timer-2am-daily.timer lacks value setting. Refusing.
[root@xen system]# systemctl disable timer-2am-daily.timer
rm '/etc/systemd/system/multi-user.target.wants/timer-2am-daily.timer'
[root@xen system]# systemctl daemon-reload
[root@xen system]# systemctl enable timer-2am-daily.timer
ln -s '/etc/systemd/system/timer-2am-daily.timer' '/etc/systemd/system/multi-user.target.wants/timer-2am-daily.timer'
[root@xen system]# systemctl status timer-2am-daily.timer -l
* timer-2am-daily.timer - 2AM Daily Timer
Loaded: loaded (/etc/systemd/system/timer-2am-daily.timer; enabled)
Active: inactive (dead)

May 30 10:54:09 xen systemd[1]: [/etc/systemd/system/timer-2am-daily.timer:7] Failed to parse calendar specification, ignoring: "*-*-*02:00:00
May 30 10:54:09 xen systemd[1]: timer-2am-daily.timer lacks value setting. Refusing.
May 30 10:55:46 xen systemd[1]: [/etc/systemd/system/timer-2am-daily.timer:7] Failed to parse calendar specification, ignoring: "*-*-*02:00:00
May 30 10:55:46 xen systemd[1]: timer-2am-daily.timer lacks value setting. Refusing.
[root@xen system]# date
Fri May 30 12:08:53 EDT 2014


Note that the log is from over an hour previous and is unchanged by anything I'm running.
Comment by Dave Reisner (falconindy) - Friday, 30 May 2014, 16:12 GMT
Right, those logs are old. Fixing the timer spec doesn't make the old logs go away. There's no bug here.
Comment by Leeman (alaricljs) - Friday, 30 May 2014, 16:16 GMT
Shouldn't a fixed timer and a daemon-reload result in an accurate reflection of the state in systemctl status? Is systemd just not cleaning up the status output because there's no log output related to that unit? Whether the timer itself is functional after this or not, the status output should be correct.
Comment by Dave Reisner (falconindy) - Friday, 30 May 2014, 16:30 GMT
> Is systemd just not cleaning up the status output because there's no log output related to that unit?
systemctl just grabs the most recent journal messages related to the unit. Reloading the unit doesn't change this unless, in doing so, there's *more* recent log messages to be displayed.
Comment by Leeman (alaricljs) - Friday, 30 May 2014, 16:45 GMT
Being that the only output pertaining to this unit is produced by systemd and the "process lifetime" of the unit is controlled by systemd, shouldn't systemd know/do better than to show the old messages?
Comment by Dave Reisner (falconindy) - Friday, 30 May 2014, 16:51 GMT
You can take that up with upstream. I'm closing this, because there's nothing here to do for Arch.

Loading...