[Pacemaker] Patch for pgsql RA
Serge Dubrouski
sergeyfd at gmail.com
Mon May 17 17:35:08 UTC 2010
Hello -
Here is follow up patch for today's incident with pgsql script. The
patch is intended to cover up an issue with missed /sbin/fuser tool:
--- /usr/lib/ocf/resource.d/heartbeat/pgsql 2010-05-03 01:20:16.000000000 -0600
+++ usr/lib/ocf/resource.d/heartbeat/pgsql.new 2010-05-17
11:32:33.000000000 -0600
@@ -291,7 +291,7 @@
if [ -f $PIDFILE ]
then
PID=`head -n 1 $PIDFILE`
- kill -0 $PID >/dev/null 2>&1 && fuser $OCF_RESKEY_pgdata
2>&1 | grep $PID >/dev/null 2>&1
+ kill -0 $PID >/dev/null 2>&1 && /sbin/fuser
$OCF_RESKEY_pgdata 2>&1 | grep $PID >/dev/null 2>&1
return $?
fi
@@ -359,6 +359,11 @@
return $OCF_ERR_INSTALLED
fi
+ if ! have_binary /sbin/fuser
+ then
+ return $OCF_ERR_INSTALLED
+ fi
+
return $OCF_SUCCESS
}
It also makes sense to update SPEC file for resource-agents package
with a dependency for psmisc package.
--
Serge Dubrouski.
More information about the Pacemaker
mailing list