This is the mail archive of the cluster-cvs@sourceware.org mailing list for the cluster.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-25-gc128baa


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=c128baa7cc5397f1fcfc72d35cdb39c089c56043

The branch, RHEL4 has been updated
       via  c128baa7cc5397f1fcfc72d35cdb39c089c56043 (commit)
      from  0536f85e62db2ac86b0f47c6e6089090261eceae (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 c128baa7cc5397f1fcfc72d35cdb39c089c56043
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Thu Apr 3 10:48:46 2008 -0500

    rgmanager/lvm.sh: Fix bug 431705
    
    - 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 |   30 ++++++++++++++++++++++++++----
 1 files changed, 26 insertions(+), 4 deletions(-)

diff --git a/rgmanager/src/resources/lvm.sh b/rgmanager/src/resources/lvm.sh
index 82f3383..fc44b09 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
 


hooks/post-receive
--
Cluster Project


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]