Skip to contentSkip to conversation

fs-lib: fix do_monitor device mapping

PATCH New Fabio M. Di Nitto 2 participants 2 messages Mar 15, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs-lib: fix do_monitor device mapping

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

Resolves: rhbz#669832

---
 rgmanager/src/resources/utils/fs-lib.sh |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)
rgmanager/src/resources/utils/fs-lib.sh +12 -1
index 4f242f7..7b933f8 100644
@@ -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}"
Signature · 1 line
1.7.4
#1 lore raw

PATCH 1/1 fs-lib: fix do_monitor device mapping

Quoted 2 lines · Fabio M. Di Nitto

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

Looks right.

Signature · 1 line
Lon Hohberger - Red Hat, Inc.