resource-agents: master - resource-agents: fix utility to obtain data from ccs_tool
Marek Grác
marx at fedoraproject.org
Fri Oct 1 19:50:14 UTC 2010
Gitweb: http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=d5902e0d09b822ba494b225041c0aeff71c1dabd
Commit: d5902e0d09b822ba494b225041c0aeff71c1dabd
Parent: 364277f52b861f596888f1812f839381ead843f6
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:39:49 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