resource-agents: master - fs-lib: fix do_monitor device mapping

Fabio M. Di Nitto fabbione at fedoraproject.org
Thu Feb 3 16:34:24 UTC 2011


Gitweb:        http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=a23793faa3c7718177cbbda77363d5fd3765415d
Commit:        a23793faa3c7718177cbbda77363d5fd3765415d
Parent:        f9960d41fb8adced22c83e6db73d950b31f7cde1
Author:        Fabio M. Di Nitto <fdinitto at redhat.com>
AuthorDate:    Thu Feb 3 17:33:25 2011 +0100
Committer:     Fabio M. Di Nitto <fdinitto at redhat.com>
CommitterDate: Thu Feb 3 17:33:25 2011 +0100

fs-lib: fix do_monitor device mapping

do_monitor needs to expand _device key to the real device
before performing checks

Resolves: rhbz#669832

Signed-off-by: Fabio M. Di Nitto <fdinitto at redhat.com>
---
 rgmanager/src/resources/utils/fs-lib.sh |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/utils/fs-lib.sh b/rgmanager/src/resources/utils/fs-lib.sh
index 4f242f7..7b933f8 100644
--- a/rgmanager/src/resources/utils/fs-lib.sh
+++ b/rgmanager/src/resources/utils/fs-lib.sh
@@ -866,7 +866,18 @@ do_stop() {
 
 
 do_monitor() {
-	is_mounted "${OCF_RESKEY_device}" "${OCF_RESKEY_mountpoint}"
+	#
+	# Get the device
+	#
+	real_device "$OCF_RESKEY_device"
+	dev="$REAL_DEVICE"
+	if [ -z "$dev" ]; then
+			ocf_log err "\
+start_filesystem: Could not match $OCF_RESKEY_device with a real device"
+			return $OCF_ERR_ARGS
+	fi
+
+	is_mounted "$dev" "${OCF_RESKEY_mountpoint}"
 
 	if [ $? -ne $YES ]; then
 		ocf_log err "${OCF_RESOURCE_INSTANCE}: ${OCF_RESKEY_device} is not mounted on ${OCF_RESKEY_mountpoint}"


More information about the cluster-commits mailing list