[systemd-devel] Failed state DBUS notification not received on sigkill of service
prashantkumar dhotre
prashantkumardhotre at gmail.com
Thu Sep 27 08:52:56 UTC 2018
Hi
Failed state DBUS notification for ActiveState property
is not received on sigkill of service, for the service that supports
restart ('Restart' value in service faile). But i see that unit goes to
failed state in journal logs
++
Sep 25 08:52:00 mynode systemd[1]: alarmd.service: Unit entered failed
state.
Sep 25 08:52:00 mynode systemd[1]: alarmd.service: Triggering OnFailure=
dependencies.
Sep 25 08:52:00 mynode systemd[1]: alarmd.service: Failed with result
'signal'.
Sep 25 08:52:00 mynode systemd[1]: alarmd.service: Service hold-off time
over, scheduling restart.
Sep 25 08:52:00 mynode systemd[1]: Stopped "Alarm agent on RE".
Sep 25 08:52:00 mynode systemd[1]: Started "Alarm agent on RE".
++
Logs from my app which monitors dbus notifications:
+++
Updated Result=signal for service alarmd.service in cache contents:
activeState=active subState=running result=signal" }
Updated ActiveState=deactivating for service alarmd.service in cache
contents: activeState=deactivating subState=running result=signal" }
Updated SubState=stop-post
Updated Result=signal for service alarmd.service in cache contents:
activeState=deactivating subState=stop-post result=signal" }
Updated ActiveState=activating for service alarmd.service in cache
contents: activeState=activating subState=stop-post result=signal" }
Updated SubState=auto-restart for service alarmd.service in cache contents:
activeState=activating subState=auto-restart result=signal" }
Updated Result=success for service alarmd.service in cache contents:
activeState=activating subState=auto-restart result=success" }
Updated ActiveState=active for service alarmd.service in cache contents:
activeState=active subState=auto-restart result=success" }
Updated SubState=running for service alarmd.service in cache contents:
activeState=active subState=running result=success" }
+++++
If service does not support restart (Restart=no), then I see that we get
Failed state DBUS notification , as ' ActiveState=failed '.
Logs from my app which monitors dbus notifications:
++
Updated Result=signal for service alarmd.service in cache contents:
activeState=deactivating subState=stop-post result=signal" }
Updated ActiveState=failed for service alarmd.service in cache contents:
activeState=failed subState=stop-post result=signal" }
Updated SubState=failed for service alarmd.service in cache contents:
activeState=failed subState=failed result=signal" }
++
1) Is this a bug ?
2) Why service is put to failed state on sigkill ?
3) if putting service into failed state on sigkill is right thing to do ,
they why dbus notification is not being sent in case of service that
supports restart.
Thanks for your help
-Prashant
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180927/76049938/attachment.html>
More information about the systemd-devel
mailing list