cluster: STABLE3 - resource-agents: fix utility to obtain data from ccs_tool

Marek Grác marx at fedoraproject.org
Fri Oct 1 19:56:49 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=12f82b57094560b127e52973ce0e17858aed6c18
Commit:        12f82b57094560b127e52973ce0e17858aed6c18
Parent:        feb56306ad3cac9357f4b34ac16d905cbac5630d
Author:        Marek 'marx' Grac <mgrac at redhat.com>
AuthorDate:    Fri Oct 1 21:39:49 2010 +0200
Committer:     Marek 'marx' Grac <mgrac at redhat.com>
CommitterDate: Fri Oct 1 21:49:38 2010 +0200

resource-agents: fix utility to obtain data from ccs_tool

Resolves: rhbz#631943
---
 rgmanager/src/resources/utils/config-utils.sh.in |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/rgmanager/src/resources/utils/config-utils.sh.in b/rgmanager/src/resources/utils/config-utils.sh.in
index 05b04fa..e3a44d0 100644
--- a/rgmanager/src/resources/utils/config-utils.sh.in
+++ b/rgmanager/src/resources/utils/config-utils.sh.in
@@ -60,6 +60,12 @@ ccs_get()
 
 	outp=$(ccs_tool query "$key" 2>&1)
 	if [ $? -ne 0 ]; then
+		if [[ "$outp" =~ "Query failed: Invalid argument" ]]; then
+			# This usually means that element does not exist
+			# e.g. when checking for IP address 
+			return 0;
+		fi
+
 		if [ "$outp" = "${outp/No data available/}" ] || [ "$outp" = "${outp/Operation not permitted/}" ]; then
 			ocf_log err "$outp ($key)"
 			return $FAIL


More information about the cluster-commits mailing list