From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27533 invoked by alias); 3 Apr 2008 16:03:19 -0000 Received: (qmail 27496 invoked by uid 9478); 3 Apr 2008 16:03:19 -0000 Date: Thu, 03 Apr 2008 16:03:00 -0000 Message-ID: <20080403160319.27480.qmail@sourceware.org> From: jbrassow@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-25-gc128baa X-Git-Refname: refs/heads/RHEL4 X-Git-Reftype: branch X-Git-Oldrev: 0536f85e62db2ac86b0f47c6e6089090261eceae X-Git-Newrev: c128baa7cc5397f1fcfc72d35cdb39c089c56043 Mailing-List: contact cluster-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: cluster-cvs-owner@sourceware.org X-SW-Source: 2008-q2/txt/msg00015.txt.bz2 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 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