Univention Bugzilla – Bug 31998
Shutdown slapd via kill HUP
Last modified: 2013-11-19 06:44:00 CET
From http://www.openldap.org/lists/openldap-software/200407/msg00624.html: Slapd interprets HUP as a "gentle" shutdown, i.e. it waits for all connections to close before shutting down. We should be able to send the slapd such a graceful restart which uses kill HUP.
The init script now supports "graceful-restart" and "graceful-stop". Both ask slapd kindly to stop and then wait 120 seconds. If it did not stop by that time the process is killed. Tested with: root@slave87:~# pkill -STOP slapd root@slave87:~# /etc/init.d/slapd graceful-restart Initiating graceful reload of ldap server(s). Sending HUP to ldap server(s): slapd ...done. ### waiting 120 seconds here Check database: ...WARNING. WARNING: There are stale locks in LDAP backend Berkeley DB. WARNING: If slapd does not respond, manual LDAP dump/restore may be necessary. Continuing BDB database check: ...done. Starting ldap server(s): slapd ...done.
OK -> strace -p $(pidof slapd) 2>&1 | grep -i Sig --- SIGHUP (Hangup) @ 0 (0) --- rt_sigreturn(0x2) -> /etc/init.d/slapd graceful-restart -> strace -p $(pidof slapd) 2>&1 | grep -i Sig --- SIGHUP (Hangup) @ 0 (0) --- rt_sigreturn(0x2) = 202 -> /etc/init.d/slapd graceful-stop OK - Changelog
UCS 3.2 has been released: http://docs.univention.de/release-notes-3.2-en.html http://docs.univention.de/release-notes-3.2-de.html If this error occurs again, please use "Clone This Bug".