[Bug 1488962] Re: systemd does not notice when services created via systemd-sysv-generator fail
clvx
1488962 at bugs.launchpad.net
Sun Jun 19 00:18:49 UTC 2016
This problem is still going on:
$ sudo apt-cache policy apache2
apache2:
Installed: 2.4.18-2ubuntu3
Candidate: 2.4.18-2ubuntu3
Version table:
*** 2.4.18-2ubuntu3 500
500 http://azure.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
$ sudo systemctl status apache2.service
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: active (exited) since Sun 2016-06-19 00:01:35 UTC; 16min ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0
Memory: 0B
CPU: 0
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1488962
Title:
systemd does not notice when services created via systemd-sysv-
generator fail
Status in apache2 package in Ubuntu:
Fix Released
Bug description:
The systemd service generated from /etc/init.d/apache2 via systemd-
sysv-generator contains the line
RemainAfterExit=yes
causing systemd to ignore crashes of the service. In order to
reproduce this, add a non-existing address to /etc/apache2/ports.conf,
which will cause the apache2 service to fail.
However, "systemctl status apache2" will still show "active(exited)",
e.g. will not recognize the service as failed. In particular,
"systemctl is-failed apache2" will still return "active" instead of
"failed".
Expected result: "systemctl is-failed apache2" should return "failed",
so that monitoring script can detect the error.
The solution would probably be to include a proper native systemd
service definition instead of using the converted sysv service.
$ apt-cache policy apache2
apache2:
Installed: 2.4.10-9ubuntu1.1
Candidate: 2.4.10-9ubuntu1.1
Version table:
*** 2.4.10-9ubuntu1.1 0
500 http://eu.archive.ubuntu.com/ubuntu/ vivid-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ vivid-security/main amd64 Packages
100 /var/lib/dpkg/status
2.4.10-9ubuntu1 0
500 http://eu.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1488962/+subscriptions
More information about the Ubuntu-sponsors
mailing list