[Pacemaker] slapd RA does not start OpenLDAP server after reboot

Igor Zinovik zinovik.igor at gmail.com
Wed Jan 23 12:24:11 EST 2013


On Wed, 23 Jan 2013 09:44:34 -0500 (EST)
Jake Smith <jsmith at argotec.com> wrote:

> 
> ----- Original Message -----
> > From: "Raoul Bhatia [IPAX]" <r.bhatia at ipax.at>
> > To: "Pacemaker list" <pacemaker at oss.clusterlabs.org>
> > Sent: Wednesday, January 23, 2013 8:20:43 AM
> > Subject: Re: [Pacemaker] slapd RA does not start OpenLDAP server after reboot
> > 
> > On 2013-01-23 14:11, Dejan Muhamedagic wrote:
> > >> I fixed slapd startup problem by changing resource agent script:
> > >> --- slapd.orig  2013-01-22 17:23:42.266314000 +0400
> > >> +++ slapd       2013-01-22 17:23:12.094422000 +0400
> > >> @@ -299,6 +299,7 @@ slapd_start()
> > >>    local reason
> > >>    local result
> > >>    local state
> > >> +  local pid_dir
> > >> 
> > >>    slapd_status `slapd_pid`; state=$?
> > >> 
> > >> @@ -324,6 +325,12 @@ slapd_start()
> > >>      options="$options $parameters"
> > >>    fi
> > >> 
> > >> +  pid_dir="/var/run/slapd"
> > >> +  if [ ! -d $pid_dir ]; then
> > >> +         mkdir -p $pid_dir
> > >> +         chown ldap:ldap $pid_dir
> > >> +  fi
> > >> +
> > >>    if [ -n "$services" ]; then
> > >>      $slapd -h "$services" $options 2>&1; result=$?
> > >>    else
> > > 
> > > Similar code is already executed in slapd_validate_all. [...]
> > 
> > woops, i missed that ;)
> > 
> 
> Igor,
> 
> I submitted the patch to correct the above issue early last year... around line 495 you should have the following (in the slapd_validate_all as Dejan said):
> 
>   pid_dir=`dirname "$pid_file"`
>   if [ ! -d "$pid_dir" ]; then
>     mkdir -p "$pid_dir"
>     chown -R "$user" "$pid_dir"
>     chgrp -R "$group" "$pid_dir"
>   fi

No i do not see these lines.
ldap1:~ # egrep -e 'ch(own|grp)' /usr/lib/ocf/resource.d/heartbeat/slapd | wc -l
0

> If your slapd RA doens't have it you may have a version prior to the patch.  I would suggest downloading the latest version of the slapd RA from here:
> https://github.com/ClusterLabs/resource-agents/tree/master/heartbeat/slapd

Yes.  Seems that my RA is out of date.  I need to try this new version.




More information about the Pacemaker mailing list