Bug#926657: openldap: slapd process failure is not detected by systemd

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#926657: openldap: slapd process failure is not detected by systemd

Heitor R. Alves de Siqueira
Package: openldap
Severity: normal

Dear Maintainer,

The slapd package for OpenLDAP is shipped with a SysV-style init script
(/etc/init.d/slapd). Systemd automatically converts this to a systemd service
by generating the unit file using the systemd-sysv-generator(8) utility. The
generated unit file contains Type=forking and RemainAfterExit=yes directives.

If the slapd daemon process exits due to some failure (e.g., it receives a
SIGTERM or SIGKILL), the failure is not detected properly by systemd. The
service is still reported as active even though the child (daemon) process has
exited with a signal.

Reply | Threaded
Open this post in threaded view
|

Bug#926657: [Pkg-openldap-devel] Bug#926657: openldap: slapd process failure is not detected by systemd

Ryan Tandy-4
Hi Heitor,

Thanks for reporting this, and also for posting your detailed notes on
the LP ticket. (For posterity: https://bugs.launchpad.net/bugs/1821343)

I was about to merge this with #877512, but if you are going with the
override drop-in solution, I would be happy to adopt that in Debian as
well to mitigate this specific issue until I get a full native service
file developed.

Thanks for helping out with openldap! :)

Reply | Threaded
Open this post in threaded view
|

Bug#926657: [Pkg-openldap-devel] Bug#926657: openldap: slapd process failure is not detected by systemd

Heitor R. Alves de Siqueira
Hi Ryan,

I'm attaching a patch for this which includes the override file.
Do you think this patch can be adopted in Debian until we have the
native service file? Please let me know if you think it needs any
changes!

Thanks,
Heitor

0001-slapd-Fix-systemd-not-detecting-service-failures.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Bug#926657: [Pkg-openldap-devel] Bug#926657: openldap: slapd process failure is not detected by systemd

Ryan Tandy-4
Control: tag -1 pending

Committed to git.

The generated unit already has Type=forking (hard-coded in
sysv-generator), so I removed that line from the drop-in.

Context for posterity: https://github.com/systemd/systemd/issues/1211#issuecomment-138915391