Cluster Project branch, RHEL5, updated. cmirror_1_1_15-31-ge4703d7

jbrassow@sourceware.org jbrassow@sourceware.org
Thu Apr 3 15:53:00 GMT 2008


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=e4703d7a4881dea28096770e07c70935180140f1

The branch, RHEL5 has been updated
       via  e4703d7a4881dea28096770e07c70935180140f1 (commit)
      from  82d50be085f83d31486796a3a7bac162a98e6024 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e4703d7a4881dea28096770e07c70935180140f1
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Thu Apr 3 10:35:28 2008 -0500

    rgmanager/lvm.sh: Fix for bug 431713
    
    - Add another check for improper HA LVM setup.  Specifically,
      check for fail-over VG name in 'volume_list', which would
      allow a machine to activate a VG regardless of tagging.
    
    - Clearer error messages
    
    - Better comments

-----------------------------------------------------------------------

Summary of changes:
 rgmanager/src/resources/lvm.sh |   32 +++++++++++++++++++++++++++-----
 1 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/rgmanager/src/resources/lvm.sh b/rgmanager/src/resources/lvm.sh
index 12649fd..4c93249 100755
--- a/rgmanager/src/resources/lvm.sh
+++ b/rgmanager/src/resources/lvm.sh
@@ -55,12 +55,33 @@ function clvm_check
 function ha_lvm_proper_setup_check
 {
 	##
+	# The default for lvm.conf:activation/volume_list is empty,
+	# this must be changed for HA LVM.
+	##
+	if ! lvm dumpconfig activation/volume_list >& /dev/null; then
+		ocf_log err "HA LVM:  Improper setup detected"
+		ocf_log err "- \"volume_list\" not specified in lvm.conf."
+		return $OCF_ERR_GENERIC
+	fi
+
+	##
 	# Machine's cluster node name must be present as
 	# a tag in lvm.conf:activation/volume_list
 	##
-	if ! lvm dumpconfig activation/volume_list >& /dev/null ||
-	   ! lvm dumpconfig activation/volume_list | grep $(local_node_name); then
-		ocf_log err "lvm.conf improperly configured for HA LVM."
+	if ! lvm dumpconfig activation/volume_list | grep $(local_node_name); then
+		ocf_log err "HA LVM:  Improper setup detected"
+		ocf_log err "- @$(local_node_name) missing from \"volume_list\" in lvm.conf"
+		return $OCF_ERR_GENERIC
+	fi
+
+	##
+	# The volume group to be failed over must NOT be in
+	# 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
+		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
 
@@ -71,7 +92,8 @@ function ha_lvm_proper_setup_check
 	##
 	# Fixme: we might be able to perform a better check...
 	if [ "$(find /boot/*.img -newer /etc/lvm/lvm.conf)" == "" ]; then
-		ocf_log err "HA LVM requires the initrd image to be newer than lvm.conf"
+		ocf_log err "HA LVM:  Improper setup detected"
+		ocf_log err "- initrd image needs to be newer than lvm.conf"
 		return $OCF_ERR_GENERIC
 	fi
 
@@ -146,7 +168,7 @@ meta-data)
 	rv=0
 	;;
 
-verify-all)
+validate-all|verify-all)
 	##
 	# We can safely ignore clustered volume groups (VGs handled by CLVM)
 	##


hooks/post-receive
--
Cluster Project



More information about the Cluster-cvs mailing list