[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
Hello Heitor, or anyone else affected, Accepted openldap into cosmic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openldap/2.4.46 +dfsg-5ubuntu1.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-cosmic to verification-done-cosmic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-cosmic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: openldap (Ubuntu Cosmic) Status: Confirmed => Fix Committed ** Tags added: verification-needed verification-needed-cosmic -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about t
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
Hello Heitor, or anyone else affected, Accepted openldap into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/openldap/2.4.45 +dfsg-1ubuntu1.2 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping! N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days. ** Changed in: openldap (Ubuntu Bionic) Status: Confirmed => Fix Committed ** Tags added: verification-needed-bionic ** Changed in: openldap (Ubuntu Xenial) Status: Confirmed => Fix Committed ** Tags added: verification-needed-xenial -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service.
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
Verified according to test case in description for cosmic: root@cosmic:~# dpkg -l | grep slapd ii slapd 2.4.46+dfsg-5ubuntu1.2 amd64 OpenLDAP server (slapd) root@cosmic:~# systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Drop-In: /lib/systemd/system/slapd.service.d └─slapd-remain-after-exit.conf Active: active (running) since Mon 2019-04-22 20:15:01 UTC; 19s ago Docs: man:systemd-sysv-generator(8) Tasks: 3 (limit: 4915) Memory: 612.7M CGroup: /system.slice/slapd.service └─2061 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d root@cosmic:~# kill -9 2061 root@cosmic:~# systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Drop-In: /lib/systemd/system/slapd.service.d └─slapd-remain-after-exit.conf Active: inactive (dead) since Mon 2019-04-22 20:15:40 UTC; 4s ago Docs: man:systemd-sysv-generator(8) Process: 2145 ExecStop=/etc/init.d/slapd stop (code=exited, status=0/SUCCESS) root@cosmic:~# systemctl cat slapd # /run/systemd/generator.late/slapd.service # Automatically generated by systemd-sysv-generator [Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/slapd Description=LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target After=remote-fs.target After=network-online.target Wants=network-online.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes SuccessExitStatus=5 6 ExecStart=/etc/init.d/slapd start ExecStop=/etc/init.d/slapd stop # /lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf [Service] Type=forking RemainAfterExit=no ** Tags removed: verification-needed-cosmic ** Tags added: verification-done-cosmic -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
Verified according to test case in description for bionic: root@bionic:~# dpkg -l | grep slapd ii slapd2.4.45+dfsg-1ubuntu1.2amd64 OpenLDAP server (slapd) root@bionic:~# systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Drop-In: /lib/systemd/system/slapd.service.d └─slapd-remain-after-exit.conf Active: active (running) since Mon 2019-04-22 20:15:10 UTC; 4min 23s ago Docs: man:systemd-sysv-generator(8) Tasks: 3 (limit: 4915) CGroup: /system.slice/slapd.service └─907 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d root@bionic:~# kill -9 907 root@bionic:~# systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Drop-In: /lib/systemd/system/slapd.service.d └─slapd-remain-after-exit.conf Active: inactive (dead) since Mon 2019-04-22 20:19:40 UTC; 1s ago Docs: man:systemd-sysv-generator(8) Process: 1011 ExecStop=/etc/init.d/slapd stop (code=exited, status=0/SUCCESS) root@bionic:~# systemctl cat slapd # /run/systemd/generator.late/slapd.service # Automatically generated by systemd-sysv-generator [Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/slapd Description=LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target After=remote-fs.target After=network-online.target Wants=network-online.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes SuccessExitStatus=5 6 ExecStart=/etc/init.d/slapd start ExecStop=/etc/init.d/slapd stop # /lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf [Service] Type=forking RemainAfterExit=no ** Tags removed: verification-needed-bionic ** Tags added: verification-done-bionic -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC;
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
Verified according to test case in description for xenial: root@xenial:~# dpkg -l | grep slapd ii slapd2.4.42+dfsg-2ubuntu3.5 amd64OpenLDAP server (slapd) root@xenial:~# systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/slapd.service.d └─slapd-remain-after-exit.conf Active: active (running) since Mon 2019-04-22 20:23:10 UTC; 14s ago Docs: man:systemd-sysv-generator(8) CGroup: /system.slice/slapd.service └─5920 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d root@xenial:~# kill -9 5920 root@xenial:~# systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; bad; vendor preset: enabled) Drop-In: /lib/systemd/system/slapd.service.d └─slapd-remain-after-exit.conf Active: inactive (dead) since Mon 2019-04-22 20:23:30 UTC; 1s ago Docs: man:systemd-sysv-generator(8) Process: 5989 ExecStop=/etc/init.d/slapd stop (code=exited, status=0/SUCCESS) root@xenial:~# systemctl cat slapd # /run/systemd/generator.late/slapd.service # Automatically generated by systemd-sysv-generator [Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/slapd Description=LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target Before=shutdown.target After=remote-fs.target After=network-online.target After=systemd-journald-dev-log.socket Wants=network-online.target Conflicts=shutdown.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes ExecStart=/etc/init.d/slapd start ExecStop=/etc/init.d/slapd stop # /lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf [Service] Type=forking RemainAfterExit=no ** Tags removed: verification-needed verification-needed-xenial ** Tags added: verification-done verification-done-xenial -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protoco
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
There's a failing autopkgtest for gnupg2 that flagged this openldap update for cosmic, but openldap looks fine. Checking autopkgtest logs for gnupg2 [0], the tests were failing before the openldap update, and it's not related to this fix. The culprit seems to be a dependency problem with wine/libwine [1]. [0] http://autopkgtest.ubuntu.com/packages/g/gnupg2/cosmic/amd64 [1] https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-cosmic/cosmic/amd64/g/gnupg2/20190416_135202_50915@/log.gz -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
gnupg2 autopkgtest failure due to bug 1825186 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Committed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
This bug was fixed in the package openldap - 2.4.46+dfsg-5ubuntu1.2 --- openldap (2.4.46+dfsg-5ubuntu1.2) cosmic; urgency=medium * Fix sysv-generator unit file by customizing parameters (LP: #1821343) - d/slapd-remain-after-exit.conf: Override RemainAfterExit to allow correct systemctl status for slapd daemon. - d/slapd.install: place override file in correct location. -- Heitor Alves de Siqueira Wed, 10 Apr 2019 09:50:13 -0300 ** Changed in: openldap (Ubuntu Cosmic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Committed Status in openldap source package in Bionic: Fix Committed Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
This bug was fixed in the package openldap - 2.4.45+dfsg-1ubuntu1.2 --- openldap (2.4.45+dfsg-1ubuntu1.2) bionic; urgency=medium * Fix sysv-generator unit file by customizing parameters (LP: #1821343) - d/slapd-remain-after-exit.conf: Override RemainAfterExit to allow correct systemctl status for slapd daemon. - d/slapd.install: place override file in correct location. -- Heitor Alves de Siqueira Wed, 10 Apr 2019 09:53:11 -0300 ** Changed in: openldap (Ubuntu Bionic) Status: Fix Committed => Fix Released ** Changed in: openldap (Ubuntu Xenial) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
This bug was fixed in the package openldap - 2.4.42+dfsg-2ubuntu3.5 --- openldap (2.4.42+dfsg-2ubuntu3.5) xenial; urgency=medium * Fix sysv-generator unit file by customizing parameters (LP: #1821343) - d/slapd-remain-after-exit.conf: Override RemainAfterExit to allow correct systemctl status for slapd daemon. - d/slapd.install: place override file in correct location. -- Heitor Alves de Siqueira Wed, 10 Apr 2019 10:01:36 -0300 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Tags removed: sts-sponsor sts-sponsor-ddstreet -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "debdiff for cosmic" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248490/+files/lp1821343-cosmic.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
-- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "debdiff for xenial" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248493/+files/lp1821343-xenial.debdiff ** Tags added: sts-sponsor -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "debdiff for bionic" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248492/+files/lp1821343-bionic.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "debdiff for disco" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248489/+files/lp1821343-disco.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
The attachment "debdiff for disco" seems to be a debdiff. The ubuntu- sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team. [This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.] ** Tags added: patch -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
> Do you need a whole service file for this? I thought you could achieve > the same with a drop-in that just overrides the required keys why would we do a SRU to hack in an override when it's just as easy to do a SRU to actually create a correct service file so no override hack is needed? -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
The sysv init script does some funky parsing of configuration files that might give us some trouble in an independent service file. I'll check if we can't work around that and do away with the sysv init script altogether, otherwise we might as well go with the drop-in override since the new service wouldn't be much different from it. ** Patch removed: "debdiff for disco" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248489/+files/lp1821343-disco.debdiff ** Patch removed: "debdiff for cosmic" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248490/+files/lp1821343-cosmic.debdiff ** Patch removed: "debdiff for bionic" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248492/+files/lp1821343-bionic.debdiff ** Patch removed: "debdiff for xenial" https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+attachment/5248493/+files/lp1821343-xenial.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
I've been doing some research on how we could implement a proper systemd unit file for slapd, and came up with interesting results. There are a number of options that we can pass to the slapd service that will give us lots of troubles on an "idiomatic" service file. To give some examples: - The PID file can be directly obtained from /etc/default/slapd if set, or it has to be parsed from /etc/ldap/slapd.d or /etc/ldap/slapd.conf. The /etc/ldap files don't follow the /etc/default syntax, so we can't just pass them with "EnvironmentFile=" in the systemd service. We would have to parse those files as is currently done by the init script. - slapd has the "-f" and "-F" flags that can be used to specify a config file or directory, respectively. It does not accept both at the same time, but SLAPD_CONF in /etc/default/slapd allows either a file or directory. The init script will figure out which of those is set, and pass the correct flag accordingly. I don't see a simple way of doing this in systemd without either polluting the SLAPD_CONF option with the necessary flag, or delegating it to a helper script which would check whether the option meant a file or a directory. - The slapd.conf file is used by other related tools (see slapd.conf(5)), which prevents us from pulling some of the options to another centralized file without also updating these tools I hoped that the upstream package would have some insight on the proper way of writing the service file, but unfortunately it seems that upstream Openldap devs are very much against the idea of shipping them (be they sysv-init or systemd files). There are some discussions on the openldap lists, one of which deals specifically with adding systemd support for slapd [0]. From that discussion, it's clear that upstream openldap is not ready to provide the necessary systemd files out-of-the- box, even when approached with relevant patches. I also checked how CentOS implement their slapd.service file since they don't seem to run into these problems. They don't use an autogenerated unit file, and have a proper one instead [1]. From what I've checked, this is easier for them for two reasons: 1) The CentOS configs for slapd are much simpler than what we have in Debian/Ubuntu (their defaults don't include most of the options that we do) 2) They use helper scripts for the funky parsing we have in the sysv-init script ("ExecStartPre=/usr/libexec/openldap/check-config.sh", which also invokes some other helper scripts) On Debian/Ubuntu, the autogenerated unit file for slapd uses the sysv-init script as a "shim" to manage the service, which makes it possible to keep the whole config-parsing insanity consistent between sysv-init and systemd. It's not the most elegant solution, but for now I believe it makes sense to include an override file for the "RemainAfterExit=" option until we have a native systemd unit file for slapd (similar to what was done for apache2 in bug 1488962 mentioned by Ryan Tandy). [0] https://www.openldap.org/its/index.cgi/Incoming?id=8707 [1] https://git.centos.org/blob/rpms!openldap.git/c7/SOURCES!slapd.service -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service -
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Bug watch added: Debian Bug tracker #926657 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926657 ** Also affects: openldap (Debian) via https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=926657 Importance: Unknown Status: Unknown ** Patch added: "lp1821343-disco.debdiff" https://bugs.launchpad.net/debian/+source/openldap/+bug/1821343/+attachment/5254240/+files/lp1821343-disco.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: Unknown Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
[sts-sponsor note] I am concerned about just adding the service unit, and not making your package work with systemd, especially for maintainer scripts (It may possibly break package upgrade, ..) IMHO it would be good to test and include an upgrade to the actual [Test Case] field. May I suggest you look at evaluating if : * Build-Depends of "dh-systemd" (debian/control) for the maintainer scripts to contain appropriate code * dh --with=systemd (debian/rules) * ... are needed ? https://people.debian.org/~stapelberg/debconf13-making-your-package- work-with-systemd.pdf Regards, Eric -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: Unknown Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
[sts-sponsor note] I am concerned about just adding the service unit, and not making your package work with systemd, especially for maintainer scripts (may break package upgrade... would be good to test and add this to the [test case]. May I suggest you look at debian/control and debian/rules to evaluate if : * Build-Depends of "dh-systemd" (debian/control) for the maintainer scripts to contain appropriate code * dh --with=systemd (debian/rules) are needed ? https://people.debian.org/~stapelberg/debconf13-making-your-package- work-with-systemd.pdf Regards, Eric -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: Unknown Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Changed in: openldap (Debian) Status: Unknown => New -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
@slashd I don't think we need anything special for systemd in the debian/{control,rules} files, since we're not shipping full systemd support with this. The slapd service is still handled by systemd-sysv- generator(8), so there's no service units that we need to include or activate in dh_systemd rules. To make sure things are working fine I went ahead and tested a package upgrade with this debdiff: ubuntu@disco:~$ dpkg -l | grep slapd ii slapd 2.4.47+dfsg-3ubuntu1amd64 OpenLDAP server (slapd) ubuntu@disco:~$ sudo apt-get --only-upgrade install slapd ubuntu@disco:~$ dpkg -l | grep slapd ii slapd 2.4.47+dfsg-3ubuntu2amd64 OpenLDAP server (slapd) ubuntu@disco:~$ systemctl cat slapd # /run/systemd/generator.late/slapd.service # Automatically generated by systemd-sysv-generator [Unit] Documentation=man:systemd-sysv-generator(8) SourcePath=/etc/init.d/slapd Description=LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Before=multi-user.target Before=multi-user.target Before=multi-user.target Before=graphical.target After=remote-fs.target After=network-online.target Wants=network-online.target [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes SuccessExitStatus=5 6 ExecStart=/etc/init.d/slapd start ExecStop=/etc/init.d/slapd stop # /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf [Service] Type=forking RemainAfterExit=no Thanks! -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Description changed: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) -Loaded: loaded (/etc/init.d/slapd; generated) -Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago - Docs: man:systemd-sysv-generator(8) - Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) - Tasks: 3 (limit: 4915) -Memory: 712.6M -CGroup: /system.slice/slapd.service -└─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d + Loaded: loaded (/etc/init.d/slapd; generated) + Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago + Docs: man:systemd-sysv-generator(8) + Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) + Tasks: 3 (limit: 4915) + Memory: 712.6M + CGroup: /system.slice/slapd.service + └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) -Loaded: loaded (/etc/init.d/slapd; generated) -Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago - Docs: man:systemd-sysv-generator(8) - Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) + Loaded: loaded (/etc/init.d/slapd; generated) + Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago + Docs: man:systemd-sysv-generator(8) + Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) + + 6) Check if systemd has loaded both + /run/systemd/generator.late/slapd.service & + /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf + + $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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 wit
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
debdiff v2 with fixed author information ** Patch added: "v2-lp1821343-disco.debdiff" https://bugs.launchpad.net/debian/+source/openldap/+bug/1821343/+attachment/5254440/+files/v2-lp1821343-disco.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Confirmed Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
Sponsored in disco. ** Changed in: openldap (Ubuntu) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: In Progress Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
This bug was fixed in the package openldap - 2.4.47+dfsg-3ubuntu2 --- openldap (2.4.47+dfsg-3ubuntu2) disco; urgency=medium * Fix sysv-generator unit file by customizing parameters (LP: #1821343) - d/slapd-remain-after-exit.conf: Override RemainAfterExit to allow correct systemctl status for slapd daemon. - d/slapd.install: place override file in correct location. -- Heitor Alves de Siqueira Mon, 08 Apr 2019 12:39:12 -0300 ** Changed in: openldap (Ubuntu) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "lp1821343-bionic.debdiff" https://bugs.launchpad.net/debian/+source/openldap/+bug/1821343/+attachment/5254687/+files/lp1821343-bionic.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "lp1821343-cosmic.debdiff" https://bugs.launchpad.net/debian/+source/openldap/+bug/1821343/+attachment/5254686/+files/lp1821343-cosmic.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Patch added: "lp1821343-xenial.debdiff" https://bugs.launchpad.net/debian/+source/openldap/+bug/1821343/+attachment/5254688/+files/lp1821343-xenial.debdiff ** Patch removed: "lp1821343-disco.debdiff" https://bugs.launchpad.net/debian/+source/openldap/+bug/1821343/+attachment/5254240/+files/lp1821343-disco.debdiff -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Tags added: sts-sponsor-ddstreet -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Confirmed Status in openldap source package in Bionic: Confirmed Status in openldap source package in Cosmic: Confirmed Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Changed in: openldap (Debian) Status: New => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: Fix Released Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/openldap/+git/openldap/+merge/370689 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Merge proposal unlinked: https://code.launchpad.net/~ahasenack/ubuntu/+source/openldap/+git/openldap/+merge/370689 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Merge proposal linked: https://code.launchpad.net/~ahasenack/ubuntu/+source/openldap/+git/openldap/+merge/370689 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp
[Touch-packages] [Bug 1821343] Re: slapd process failure is not detected by systemd
** Merge proposal unlinked: https://code.launchpad.net/~ahasenack/ubuntu/+source/openldap/+git/openldap/+merge/370689 -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to openldap in Ubuntu. https://bugs.launchpad.net/bugs/1821343 Title: slapd process failure is not detected by systemd Status in openldap package in Ubuntu: Fix Released Status in openldap source package in Xenial: Fix Released Status in openldap source package in Bionic: Fix Released Status in openldap source package in Cosmic: Fix Released Status in openldap package in Debian: New Bug description: [Impact] Systemd service reports slapd as active, even though it may have failed [Description] 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. We can easily fix this by including a proper systemd service file for slapd in the openldap package. Since the init.d script already does most of the necessary work (parsing configs, setting up PID files, etc.), we don't need anything complicated for the systemd unit file. Just making sure that RemainAfterExit is set to "no" makes the systemd service behave in the expected way. [Test Case] 1) Deploy a disco container $ lxc launch images:ubuntu/disco disco 2) Install slapd ubuntu@disco:~$ sudo apt update && sudo apt install slapd -y 3) Verify that slapd is running with the auto-generated service ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (running) since Fri 2019-03-22 11:51:22 UTC; 40min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) Tasks: 3 (limit: 4915) Memory: 712.6M CGroup: /system.slice/slapd.service └─1109 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -F /etc/ldap/slapd.d 4) SIGKILL the slapd process (PID is displayed in systemctl status output) ubuntu@disco:~$ sudo kill -9 1109 5) Check if systemd service lists slapd as still active, even though it was terminated ubuntu@disco:~$ systemctl status slapd ● slapd.service - LSB: OpenLDAP standalone server (Lightweight Directory Access Protocol) Loaded: loaded (/etc/init.d/slapd; generated) Active: active (exited) since Fri 2019-03-22 11:51:22 UTC; 42min ago Docs: man:systemd-sysv-generator(8) Process: 1103 ExecStart=/etc/init.d/slapd start (code=exited, status=0/SUCCESS) 6) Check if systemd has loaded both /run/systemd/generator.late/slapd.service & /usr/lib/systemd/system/slapd.service.d/slapd-remain-after-exit.conf $ systemctl cat slapd [Regression Potential] The regression potential for this fix should be very low, if we keep the new systemd unit file close to the one generated by systemd-sysv-generator(8). The only significant change would be the RemainAfterExit directive, and this should make the slapd service behave like a "normal" forking service. Nonetheless, we'll perform scripted test runs to make sure no regressions arise. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/1821343/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp