cluster: RHEL6 - halvm: Fix bug 506587: lvm agent incorrectly reports vg is in volume_list

Jonathan Brassow jbrassow at fedoraproject.org
Fri May 14 20:34:37 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=cecf7f219af89600d06e8b5cb7627ae77aca3c4d
Commit:        cecf7f219af89600d06e8b5cb7627ae77aca3c4d
Parent:        cae5311a3695e7a6a73e572a9db8e8a5bc148c1d
Author:        Jonathan Brassow <jbrassow at redhat.com>
AuthorDate:    Fri May 14 15:28:06 2010 -0500
Committer:     Jonathan Brassow <jbrassow at redhat.com>
CommitterDate: Fri May 14 15:31:22 2010 -0500

halvm: Fix bug 506587: lvm agent incorrectly reports vg is in volume_list

If the name of the VG controlled by rgmanager is a substring of the name
of the node, the HA-LVM script will complain of an improper setup.

The fix is to also look for the associated quotes that are necessary when
specifying strings in lvm.conf.  Thanks to John Ruemker for the patch.
---
 rgmanager/src/resources/lvm.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/lvm.sh b/rgmanager/src/resources/lvm.sh
index 4b7155c..7f174ca 100644
--- a/rgmanager/src/resources/lvm.sh
+++ b/rgmanager/src/resources/lvm.sh
@@ -47,7 +47,7 @@ function ha_lvm_proper_setup_check
 	# lvm.conf:activation/volume_list; otherwise, machines
 	# will be able to activate the VG regardless of the tags
 	##
-	if lvm dumpconfig activation/volume_list | grep $OCF_RESKEY_vg_name; then
+	if lvm dumpconfig activation/volume_list | grep "\"$OCF_RESKEY_vg_name\""; then
 		ocf_log err "HA LVM:  Improper setup detected"
 		ocf_log err "- $OCF_RESKEY_vg_name found in \"volume_list\" in lvm.conf"
 		return $OCF_ERR_GENERIC


More information about the cluster-commits mailing list