Recent openrc-0.11.5 put /var/run on tmpfs (see tracker bug #332633). Now because of # /usr/sbin/slaptest -u -f /etc/openldap/slapd.conf 50b48cb3 unable to open file "/var/run/openldap/slapd.pid": 2 (No such file or directory) slapd fails to start: # /etc/init.d/slapd --debug start + _conf_d=/etc/init.d/../conf.d + _c=slapd + '[' -n slapd -a slapd '!=' slapd ']' + unset _c + sourcex -e /etc/init.d/../conf.d/slapd.default + '[' -e = -e ']' + shift + '[' -e /etc/init.d/../conf.d/slapd.default ']' + return 1 + sourcex -e /etc/init.d/../conf.d/slapd + '[' -e = -e ']' + shift + '[' -e /etc/init.d/../conf.d/slapd ']' + . /etc/init.d/../conf.d/slapd ++ INSTANCE=openldap ++ OPTS_CONF='-f /etc/openldap/slapd.conf' ++ OPTS='-f /etc/openldap/slapd.conf -h '\''ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'\''' + unset _conf_d + sourcex -e /etc/rc.conf + '[' -e = -e ']' + shift + '[' -e /etc/rc.conf ']' + . /etc/rc.conf ++ rc_shell=/sbin/sulogin ++ unicode=YES ++ rc_tty_number=12 ++ rc_logger=YES ++ rc_sys= + '[' Linux = Linux -a start = start ']' + '[' -d /sys/fs/cgroup/openrc ']' + mkdir -p /sys/fs/cgroup/openrc/slapd + echo 19768 + '[' -n '' ']' + sourcex /etc/init.d/slapd + '[' /etc/init.d/slapd = -e ']' + . /etc/init.d/slapd ++ extra_commands=checkconfig ++ '[' -z openldap ']' + unset _d + unset _f + '[' -n '' ']' + '[' -n start ']' + '[' start = depend ']' + for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands' '$extra_stopped_commands' + '[' describe = start ']' + for _cmd in describe start stop status '${extra_commands:-$opts}' '$extra_started_commands' '$extra_stopped_commands' + '[' start = start ']' ++ command -v start + '[' start = start ']' + yesno + '[' -z '' ']' + return 1 + unset _cmd + case $1 in + verify_boot + '[' '!' -e /run/openrc/softlevel ']' + return 0 ++ command -v start_pre + '[' '' = start_pre ']' + start + checkconfig -Q + /usr/sbin/slaptest -u -Q -f /etc/openldap/slapd.conf + eerror 'There is a problem with your slapd.conf!' * There is a problem with your slapd.conf! + return 1 + exit 1 * ERROR: slapd failed to start
As far as I can tell at least openldap-2.4.33 is installing an init script that is doing checkpath... did you update your init script?
The init script included with net-nds/openldap-2.4.30 runs checkpath but fails with "There is a problem with your slapd.conf!" The init script does not create /var/run/openldap/ or /run/openldap/ either. And, yes, I ran etc-update. I had to comment out that whole section to figure out what was really going on. Here is the init script from openldap-2.4.30: #!/sbin/runscript # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/net-nds/openldap/files/slapd-initd-2.4.28-r1,v 1.2 2012/02/12 21:35:04 robbat2 Exp $ extra_commands="checkconfig" [ -z "$INSTANCE" ] && INSTANCE="openldap${SVCNAME#slapd}" depend() { need net before dbus hald provide ldap } start() { if ! checkconfig -Q ; then eerror "There is a problem with your slapd.conf!" return 1 fi ebegin "Starting ldap-server" [ -n "$KRB5_KTNAME" ] && export KRB5_KTNAME eval start-stop-daemon --start --pidfile /var/run/openldap/${SVCNAME}.pid --exec /usr/lib64/openldap/slapd -- -u ldap -g ldap "${OPTS}" eend $? } stop() { ebegin "Stopping ldap-server" start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/${SVCNAME}.pid eend $? } checkconfig() { /usr/sbin/slaptest -u "$@" ${OPTS_CONF} }
In May the call to checkpath was added to files/slapd-initd-2.4.28-r1 without bumping then already stable openldap-2.4.30: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-nds/openldap/files/slapd-initd-2.4.28-r1?r1=1.2&r2=1.3 After recompiling slapd starts. Please bump now before other users get a non-starting openldap.
Got the same problem: have to create /var/run/openldap at every reboot (luckily I don't need to reboot often) openldap version is: openldap-2.4.30 openrc version is: openrc-0.11.8
This one just bit me. WTF. Who "fixes" such a critical issue without revbump? :(
+ 14 Jan 2013; Patrick Lauer <patrick@gentoo.org> +openldap-2.3.43-r2.ebuild, + files/slapd-initd: + Bump 2.3 for init script checkpath change, #444912 This makes 2.3 actually able to start on bootup, which is mildly useful in many scenarios ;)
So how about fixing this bug for 2.4.30 which is the latest stable now? That's funny the bug is open since November and many people are getting not starting slapd now.
Oh, I misread the thread. So it _was_ fixed, but no-one still cares to add -r1 to 2.4.30? Brilliant.
It's not uncommon since it's an issue you get after a reboot. I.E. I rebooted my server twice last year, so It's normal I think I noticed the problem only after 3 months.
Looked in another gentoo machine with openldap. I noticed this slight difference: --- /etc/init.d/slapd 2013-02-05 11:59:32.000000000 +0100 +++ ./slapd_old 2013-02-05 12:38:17.000000000 +0100 @@ -14,7 +14,6 @@ } start() { - checkpath -q -d /var/run/openldap/ -o ldap:ldap if ! checkconfig -Q ; then eerror "There is a problem with your slapd.conf!" return 1 Adding this line make the init script works on the original server too. The only difference I can think of is that the new gentoo machine is amd64 arch instead of i686. Could be that? Are init-scripts arch dependent?
in 2.4.40