resource-agents: master - rgmanager: Fix relocation & migration errors

Marek Grác marx at fedoraproject.org
Thu Oct 7 15:54:19 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=193ff0620e43046ff3d0b5df6faf9bae8746d471
Commit:        193ff0620e43046ff3d0b5df6faf9bae8746d471
Parent:        d5902e0d09b822ba494b225041c0aeff71c1dabd
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Thu Oct 7 14:28:14 2010 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Thu Oct 7 14:28:14 2010 +0200

rgmanager: Fix relocation & migration errors

If you relocate a service but in the end, it ends
up on the same node, the error message was "Failure".

While technically correct because the relocation
failed, there really is no reason to not have an
error to indicate the condition that the service
is still running.

Furthermore, during migration, if a migration had
a non-critical failure causing the migration to
fail but leaving a virtual machine running on the
original owner, there was no method to detect this
particular condition.

Signed-off-by: Lon Hohberger <lhh at redhat.com>
---
 rgmanager/src/resources/vm.sh |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/vm.sh b/rgmanager/src/resources/vm.sh
index d2bd0b7..e23d5ba 100644
--- a/rgmanager/src/resources/vm.sh
+++ b/rgmanager/src/resources/vm.sh
@@ -1031,9 +1031,13 @@ case $1 in
 			# If the VM is still in good health, return
 			# a value to rgmanager to indicate the 
 			# non-critical error
+			#
+			# OCF states that codes 150-199 are reserved
+			# for application use, so we'll use 150
+			#
 			do_status > /dev/null
 			if [ $? -eq 0 ]; then
-				rv=$OCF_NOT_RUNNING
+				rv=150
 			fi
 		fi
 		exit $rv


More information about the cluster-commits mailing list