|Summary:||lvm agent incorrectly reports vg is in volume_list|
|Product:||Red Hat Enterprise Linux 6||Reporter:||Jonathan Earl Brassow <jbrassow>|
|Component:||resource-agents||Assignee:||Jonathan Earl Brassow <jbrassow>|
|Status:||CLOSED CURRENTRELEASE||QA Contact:||Cluster QE <mspqa-list>|
|Version:||6.0||CC:||cluster-maint, cmarthal, fdinitto, iannis, jruemker, lhh|
|Fixed In Version:||resource-agents-3.0.12-2.el6||Doc Type:||Bug Fix|
|Doc Text:||Story Points:||---|
|Last Closed:||2010-11-10 22:15:53 UTC||Type:||---|
|oVirt Team:||---||RHEL 7.3 requirements from Atomic Host:|
|Cloudforms Team:||---||Target Upstream Version:|
|Bug Depends On:||506587|
Description Jonathan Earl Brassow 2010-05-17 20:30:29 UTC
+++ This bug was initially created as a clone of Bug #506587 +++ Description of problem: When using an lvm resource with a volume group name that is a substring of the nodename or another volume group, the lvm resource agent will fail to start that resource. For example if the resource is: <lvm lv_name="ext3-a" name="mysql-lv" vg_name="clust"> And the volume_list is: volume_list = [ "VolGroup00", "@jrummy5-1-clust.ruemker.pvt" ] Since the vg_name (clust) is a substring of the nodename, it produces this error: # rg_test test /etc/cluster/cluster.conf start service mysql-server Running in test mode. Starting mysql-server... [...] volume_list=["VolGroup00", "@jrummy5-1-clust.ruemker.pvt"] volume_list=["VolGroup00", "@jrummy5-1-clust.ruemker.pvt"] <err> HA LVM: Improper setup detected <err> - clust found in "volume_list" in lvm.conf This is caused by 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 fi Since entries in the volume_list must be in quotes anyways, there is an easy way to fix this: --- /usr/share/cluster/lvm.sh.orig 2009-06-17 16:33:21.000000000 -0400 +++ /usr/share/cluster/lvm.sh 2009-06-17 16:33:54.000000000 -0400 @@ -79,7 +79,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 I realize this situation may be kind of rare, but I'm betting I'm not the only person who uses the word cluster or clust in both the hostnames and volume group name. Version-Release number of selected component (if applicable): rgmanager-2.0.46-1.el5 How reproducible: Always Steps to Reproduce: 1. Configure an lvm resource where the volume group name is a substring of the node name that is in the volume_list in /etc/lvm/lvm.conf 2. Start the service Actual results: Service fails to start Expected results: Service starts --- Additional comment from email@example.com on 2009-06-17 16:44:47 EDT --- Oops. The code snippet I pasted was actually my patched version. I meant to say This is caused by: 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 fi --- Additional comment from firstname.lastname@example.org on 2010-05-14 16:14:49 EDT --- Patch pulled in to rhel5 tree
Comment 1 Jonathan Earl Brassow 2010-05-17 20:33:21 UTC
Created attachment 414657 [details] Patch to fix problem - waiting for approval flags
Comment 2 RHEL Product and Program Management 2010-05-17 20:45:28 UTC
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion.
Comment 3 Jonathan Earl Brassow 2010-05-18 18:23:34 UTC
commit 9494b5e95ccd681c3f60601b6e306b670c73edbd Author: Jonathan Brassow <email@example.com> Date: Tue May 18 13:18:53 2010 -0500 halvm: Fix bug 593108: 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.
Comment 5 Corey Marthaler 2010-09-16 16:19:41 UTC
Marking verified SanityOnly since ha lvm was only tested with clvmd locking in rhel6.0.
Comment 6 firstname.lastname@example.org 2010-11-10 22:15:53 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve the problem described in this bug report. This report is therefore being closed with a resolution of CURRENTRELEASE. You may reopen this bug report if the solution does not work for you.