Hi, I have a question regarding systemd behavior during shutdown. I am using systemd 219 on a Linux 4.1 kernel(custom distribution). When I issue a "shutdown" command I observe something unusual :-
If a process managed by a systemd unit file with "Restart=always" exits prior to receiving a SIGTERM, systemd attempts to restart the service. However, since the system is shutting down, systemd detects a conflict with shutdown.target, and declares that the service had entered "failed" state. Wouldn't it be cleaner to detect this before attempting to execute the restart job? A service voluntarily exiting during shutdown should not be considered as a failure. Sample journal logs with detailed output enabled:- Sep 22 22:59:34 re0 systemd[1]: foo.service holdoff time over, scheduling restart. 33937 Sep 22 22:59:34 re0 systemd[1]: Trying to enqueue job foo.service/restart/fail Sep 22 22:59:34 re0 systemd[1]: Requested transaction contradicts existing jobs: Transaction is destructive Sep 22 22:59:34 re0 systemd[1]:foo.service failed to schedule restart job: Transaction is destructive. Sep 22 22:59:34 re0 systemd[1]: foo.service changed auto-restart -> failed Thanks, Shreyas
_______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel