[rabbitmq-discuss] [PATCH 02 of 10] OCF resource agent: use ocf_is_probe

Florian Haas florian.haas at linbit.com
Tue May 11 18:09:39 BST 2010


# HG changeset patch
# User Florian Haas <florian.haas at linbit.com>
# Date 1273592868 -7200
# Node ID 756422c2ee0871e255ffae831d1fbddc9a2d7fb5
# Parent  d3292da34f9963c156ea2987cd0a15fd313b61d5
OCF resource agent: use ocf_is_probe

Linux-HA comes with the ocf_is_probe function to determine whether a
probe operation is in progress. Use this to determine whether to do
full or partial validation.

diff -r d3292da34f99 -r 756422c2ee08 packaging/common/rabbitmq-server.ocf
--- a/packaging/common/rabbitmq-server.ocf	Tue May 11 17:45:08 2010 +0200
+++ b/packaging/common/rabbitmq-server.ocf	Tue May 11 17:47:48 2010 +0200
@@ -259,12 +259,6 @@
 rabbit_start() {
     local rc
 
-    rabbit_validate_full
-    rc=$?
-    if [ "$rc" != $OCF_SUCCESS ]; then
-        return $rc
-    fi
-
     export_vars
 
     $RABBITMQ_MULTI start_all 1 > ${RABBITMQ_LOG_BASE}/startup_log 2> ${RABBITMQ_LOG_BASE}/startup_err &
@@ -339,7 +333,11 @@
 	;;
 esac
 
-rabbit_validate_partial || exit
+if ocf_is_probe; then
+    rabbit_validate_partial || exit
+else
+    rabbit_validate_full || exit
+fi
 
 case $__OCF_ACTION in
     start)





More information about the rabbitmq-discuss mailing list