Bug 62876 - Timer-activated services don't recover after failure and reset-failed
Summary: Timer-activated services don't recover after failure and reset-failed
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-28 17:58 UTC by David Strauss
Modified: 2013-05-06 19:18 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description David Strauss 2013-03-28 17:58:44 UTC
Units with timer activation currently get rescheduled for their next run following successful completion of their last run. However, if the service fails on a run, it goes into a failed state that has no future run scheduled.

Currently:
After exist with failure, only starting the timer-activated service manually and having it exit successfully recovers the state of scheduled runs.

Expected behavior:
At a minimum, running "systemctl reset-failed" (or similar) should cause it to go back into having scheduled runs, but it doesn't.

It's possible that future runs should get scheduled even if service units exits with failure, to be more like cron/anacron. Maybe such "honeybadger" scheduling could be an option for a given timer.

Workarounds:
It's possible to set expected exit codes to mask failure from systemd so future runs always get scheduled.
Comment 1 David Strauss 2013-03-28 18:00:34 UTC
Also, reset-failed + restart on the timer unit also doesn't kick the service back into scheduled runs.
Comment 2 David Strauss 2013-03-28 18:05:48 UTC
I've classified this as "high" severity because this breaks critical system maintenance jobs silently. Both the timer and the service seem to be in a good state following reset-failed, but the service doesn't run.
Comment 3 David Strauss 2013-03-28 18:07:11 UTC
To cross-link, here's the request to backport to current Fedora packages:
https://bugzilla.redhat.com/show_bug.cgi?id=928921
Comment 4 Lennart Poettering 2013-05-06 19:18:56 UTC
Fixed in git.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.