public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: jbrassow@sourceware.org To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com Subject: Cluster Project branch, master, updated. gfs-kernel_0_1_22-122-ge82959a Date: Tue, 01 Apr 2008 21:40:00 -0000 [thread overview] Message-ID: <20080401214009.23416.qmail@sourceware.org> (raw) 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=e82959afc8e649029122bfb8a491abef861105e2 The branch, master has been updated via e82959afc8e649029122bfb8a491abef861105e2 (commit) from f278c0e58794894a504eb792d3ca436eab961e65 (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 e82959afc8e649029122bfb8a491abef861105e2 Author: Jonathan Brassow <jbrassow@redhat.com> Date: Tue Apr 1 16:24:53 2008 -0500 rgmanager/lvm.sh: Fix bug bz242798 Allow a machine to fence itself in the event that it cannot deactivate logical volumes. (The user must explicitly enable this option.) This is useful in cases where one machine in the cluster looses connectivity to its resources, but the others don't. The machine fences itself and the service moves to another machine. ----------------------------------------------------------------------- Summary of changes: rgmanager/src/resources/lvm.metadata | 13 ++++++++++++- rgmanager/src/resources/lvm_by_lv.sh | 15 ++++++++++++++- rgmanager/src/resources/lvm_by_vg.sh | 17 +++++++++++++++-- 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/rgmanager/src/resources/lvm.metadata b/rgmanager/src/resources/lvm.metadata index 03a5655..650675b 100755 --- a/rgmanager/src/resources/lvm.metadata +++ b/rgmanager/src/resources/lvm.metadata @@ -39,7 +39,18 @@ If you can see this, your GUI is broken. </shortdesc> <content type="string"/> - </parameter> + </parameter> + + <parameter name="self_fence"> + <longdesc lang="en"> + If set and the clean up of the tags fails, the node will + immediately reboot. + </longdesc> + <shortdesc lang="en"> + Fence the node if it is not able to clean up LVM tags + </shortdesc> + <content type="boolean"/> + </parameter> <parameter name="nfslock" inherit="service%nfslock"> <longdesc lang="en"> diff --git a/rgmanager/src/resources/lvm_by_lv.sh b/rgmanager/src/resources/lvm_by_lv.sh index e14540f..6691181 100644 --- a/rgmanager/src/resources/lvm_by_lv.sh +++ b/rgmanager/src/resources/lvm_by_lv.sh @@ -173,6 +173,13 @@ lv_activate_and_tag() declare action=$1 declare tag=$2 declare lv_path=$3 + typeset self_fence="" + + case ${OCF_RESKEY_self_fence} in + "yes") self_fence=1 ;; + 1) self_fence=1 ;; + *) self_fence="" ;; + esac if [ -z $action ] || [ -z $tag ] || [ -z $lv_path ]; then ocf_log err "Supplied args: 1) $action, 2) $tag, 3) $lv_path" @@ -194,7 +201,13 @@ lv_activate_and_tag() else ocf_log notice "Deactivating $lv_path" if ! lv_activate_resilient $action $lv_path; then - ocf_log err "Unable to deactivate $lv_path" + if [ "$self_fence" ]; then + ocf_log err "Unable to deactivate $lv_path: REBOOTING" + sync + reboot -fn + else + ocf_log err "Unable to deactivate $lv_path" + fi return $OCF_ERR_GENERIC fi diff --git a/rgmanager/src/resources/lvm_by_vg.sh b/rgmanager/src/resources/lvm_by_vg.sh index b1840a1..8fa36d6 100755 --- a/rgmanager/src/resources/lvm_by_vg.sh +++ b/rgmanager/src/resources/lvm_by_vg.sh @@ -242,17 +242,30 @@ function vg_stop { local a local results + typeset self_fence="" + + case ${OCF_RESKEY_self_fence} in + "yes") self_fence=1 ;; + 1) self_fence=1 ;; + *) self_fence="" ;; + esac # Shut down the volume group # Do we need to make this resilient? vgchange -an $OCF_RESKEY_vg_name # Make sure all the logical volumes are inactive - results=(`lvs -o name,attr --noheadings 2> /dev/null $OCF_RESKEY_vg_name`) + results=(`lvs -o name,attr --noheadings $OCF_RESKEY_vg_name 2> /dev/null`) a=0 while [ ! -z ${results[$a]} ]; do if [[ ${results[$(($a + 1))]} =~ ....a. ]]; then - ocf_log err "Logical volume $OCF_RESKEY_vg_name/${results[$a]} failed to shutdown" + if [ "$self_fence" ]; then + ocf_log err "Unable to deactivate $lv_path REBOOT" + sync + reboot -fn + else + ocf_log err "Logical volume $OCF_RESKEY_vg_name/${results[$a]} failed to shutdown" + fi return $OCF_ERR_GENERIC fi a=$(($a + 2)) hooks/post-receive -- Cluster Project
reply other threads:[~2008-04-01 21:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20080401214009.23416.qmail@sourceware.org \ --to=jbrassow@sourceware.org \ --cc=cluster-cvs@sources.redhat.com \ --cc=cluster-devel@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).