systemd does not notice when services created via systemd-sysv-generator fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apache2 (Ubuntu) |
Fix Released
|
Medium
|
Kick In |
Bug Description
The systemd service generated from /etc/init.d/apache2 via systemd-
RemainAfterExit=yes
causing systemd to ignore crashes of the service. In order to reproduce this, add a non-existing address to /etc/apache2/
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://
500 http://
100 /var/lib/
2.
500 http://
tags: | added: systemd-boot |
Changed in apache2 (Ubuntu): | |
importance: | Undecided → Medium |
Changed in apache2 (Ubuntu): | |
assignee: | nobody → Kick In (kick-d) |
tags: | added: sts-sponsor |
Changed in apache2 (Ubuntu): | |
milestone: | none → ubuntu-16.04 |
tags: | removed: sts-sponsor |
Status changed to 'Confirmed' because the bug affects multiple users.