Skip to contentSkip to conversation

Cluster Project branch, RHEL4, updated. gfs-kernel_2_6_9_76-23-g36e10fa

Cluster-devel [email protected] 1 participant 1 message Apr 2, 2008

lore
Share & tools
lore
#0 lore 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=36e10fa435afc59e5a0e658c1b9b7ee2c34f184a

The branch, RHEL4 has been updated

       via  36e10fa435afc59e5a0e658c1b9b7ee2c34f184a (commit)
       via  a0e32d4eea87f15b2e07c8f61ecd53bd2462e73f (commit)
      from  d0aecbf552f27bb2bf9d3c66015dd4d8df559dd8 (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 36e10fa435afc59e5a0e658c1b9b7ee2c34f184a

Author: Jonathan Brassow <[email protected]>
Date:   Wed Apr 2 14:25:22 2008 -0500

rgmanager/lvm.sh: Make lvm.sh call into lvm_by_*.sh (RE: bz427377)

lvm_by_*.sh scripts are updated. Now call them. This makes lvm.sh a wrapper around lvm_by_*.sh scripts

commit a0e32d4eea87f15b2e07c8f61ecd53bd2462e73f

Author: Jonathan Brassow <[email protected]>
Date:   Wed Apr 2 14:19:02 2008 -0500

rgmanager/lvm.sh: Updated fix for bz242798

When fixing bug Bug 427377 (allow multiple LVs / VG), I failed to commit the changes to lvm.sh - which effectively just became a shell that called functions in other files.

Now, I need to update the other files with recent bug fixes and then make the change that was necessary for bug 427377 - removing the functional contents of lvm.sh.

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

Summary of changes:

 rgmanager/src/resources/lvm.metadata |   16 +-
 rgmanager/src/resources/lvm.sh       |  500 ++++------------------------------
 rgmanager/src/resources/lvm_by_lv.sh |   15 +-
 rgmanager/src/resources/lvm_by_vg.sh |   17 +-
 4 files changed, 94 insertions(+), 454 deletions(-)
rgmanager/src/resources/lvm.metadata +8 -8
index 61a740b..650675b 100755
@@ -42,14 +42,14 @@
 	</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"/>
+	    <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">
rgmanager/src/resources/lvm.sh +57 -443

576 lines not on this page · raw message

rgmanager/src/resources/lvm_by_lv.sh +14 -1
index e14540f..6691181 100644
@@ -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
 
rgmanager/src/resources/lvm_by_vg.sh +15 -2
index b1840a1..8fa36d6 100755
@@ -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