[systemd-bugs] [Bug 89087] New: Restart policy not applied to service that Requires another and ExecStop fails
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Feb 11 11:02:12 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=89087
Bug ID: 89087
Summary: Restart policy not applied to service that Requires
another and ExecStop fails
Product: systemd
Version: unspecified
Hardware: Other
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: brian at waldon.cc
QA Contact: systemd-bugs at lists.freedesktop.org
1. place the following units in the systemd search path:
# /etc/systemd/system/foo.service
[Unit]
Requires=bar.service
[Service]
Restart=always
RestartSec=10s
ExecStart=/usr/bin/bash -c "sleep 10; exit 255"
ExecStop=/usr/bin/bash -c "exit 1"
# /etc/systemd/system/bar.service
[Unit]
BindsTo=foo.service
After=foo.service
[Service]
ExecStart=/usr/bin/sleep infinity
2. Run systemctl start foo.service. foo.service and bar.service will both enter
the loaded/active state
3. After 10s, foo.service will enter the loaded/failed state, while bar.service
will enter loaded/inactive. The the Restart policy of foo.service should be
applied, but it is not, and foo.service remains inactive until a user
intervenes.
If you reattempt the above steps after removing either the Requires or the
ExecStop options from foo.service, however, the Restart policy will be applied
successfully. I expected the Restart policy to be applied even with the
ExecStop/Requires options.
For reference:
$ systemctl --version
systemd 218
-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP
-GCRYPT -GNUTLS -ACL -XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20150211/fc3b16a9/attachment-0001.html>
More information about the systemd-bugs
mailing list