[Pacemaker] unpack_rsc_op: Hard error
Pavlos Parissis
pavlos.parissis at gmail.com
Sun Oct 10 11:30:32 UTC 2010
On 9 October 2010 23:20, Pavlos Parissis <pavlos.parissis at gmail.com> wrote:
> Hi,
>
> Does anyone know why PE wants to unpack resources on nodes that will
> never run due to location constraints?
> I am getting this messages and I am wondering if they harmless or not.
>
> 23:12:38 pengine: [7705]: notice: unpack_rsc_op: Hard error -
> sshd-pbx_01_monitor_0 failed with rc=5: Preventing sshd-pbx_01 from
> re-starting on node-02
> 23:12:38 pengine: [7705]: notice: unpack_rsc_op: Hard error -
> pbx_01_monitor_0 failed with rc=5: Preventing pbx_01 from re-starting
> on node-02
>
> Cheers,
> Pavlos
>
It seams that return code of 5 from a LSB script confuses the cluster.
I have made my init script to be LSB compliant, it passes the tests
here[1], but I have also implemented what it is mentioned here [2]
regarding the exit codes.
I have implemented the exit code 5 which causes troubles because when
the cluster run the monitor on the slave node, where no resources are
active, gets rc=5.
If I remove the exit 5 everything is fine. Is this a expected behavior?
[1]http://www.clusterlabs.org/doc/en-US/Pacemaker/1.0/html/Pacemaker_Explained/ap-lsb.html
[2]http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
the init script
[root at node-03 ~]# cat /etc/init.d/znd-pbx_01
#!/bin/bash
#
### BEGIN INIT INFO
# Provides: pbx_01
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
# Default-Start: 3 4 5
# Default-Stop: 0 1 2 6
# Short-Description: start and stop pbx_01
# Description: Init script fro pbxnsip.
### END INIT INFO
# source function library
. /etc/init.d/functions
RETVAL=0
# Installation location
INSTALLDIR=/pbx_service_01/pbxnsip
PBX_CONFIG=$INSTALLDIR/pbx.xml
PBX=pbx_01
PID_FILE=/var/run/$PBX.pid
LOCK_FILE=/var/lock/subsys/$PBX
PBX_OPTIONS="--dir $INSTALLDIR --config $PBX_CONFIG --pidfile $PID_FILE"
#sleep 10;
#[ -x $INSTALLDIR/$PBX ] || exit 5
start()
{
echo -n "Starting PBX: "
daemon --pidfile $PID_FILE $INSTALLDIR/$PBX $PBX_OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $LOCK_FILE
return $RETVAL
}
stop()
{
echo -n "Stopping PBX: "
killproc -p $PID_FILE $PBX
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $LOCK_FILE
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
force-reload)
stop
start
;;
status)
status -p $PID_FILE $PBX
RETVAL=$?
;;
*)
echo $"Usage: $0 {start|stop|restart|force-reload|status}"
exit 2
esac
exit $RETVAL
[root at node-03 ~]#
More information about the Pacemaker
mailing list