Re: [systemd-devel] Question regarding systemd behavior during shutdown

2016-11-03 Thread Lennart Poettering
On Thu, 03.11.16 14:01, svk (shreyas...@gmail.com) wrote:

> 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 :-

219 is really old, and the behaviour regarding the shutdown
transaction has changed a bit in the past. Any chance you can verify
this with something recent before we look into this?

Thanks,

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Question regarding systemd behavior during shutdown

2016-11-03 Thread svk
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