Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 198841 Details for
Bug 254111
rgmanager umounts shared partition gfs although its used by another service
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Preliminary patch
rgmanager-254111.patch (text/plain), 5.48 KB, created by
Lon Hohberger
on 2007-09-18 20:46:16 UTC
(
hide
)
Description:
Preliminary patch
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-09-18 20:46:16 UTC
Size:
5.48 KB
patch
obsolete
>Index: init.d/rgmanager >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/init.d/rgmanager,v >retrieving revision 1.3.2.5 >diff -u -r1.3.2.5 rgmanager >--- init.d/rgmanager 4 Jan 2007 15:52:41 -0000 1.3.2.5 >+++ init.d/rgmanager 18 Sep 2007 20:42:57 -0000 >@@ -93,6 +93,7 @@ > > case $1 in > start) >+ rm -f /var/run/cluster/rgmanager/* > [ -z "$RGMGR_OPTS" ] && RGMGR_OPTS="-t 30" > echo -n $"Starting $ID: " > daemon $RGMGRD $RGMGR_OPTS >@@ -143,6 +144,7 @@ > stop_cluster > fi > >+ rm -f /var/run/cluster/rgmanager/* > rm -f /var/lock/subsys/rgmanager > log_and_print $LOG_NOTICE "$ID is stopped." > ;; >Index: src/resources/Makefile >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/src/resources/Makefile,v >retrieving revision 1.4.2.10 >diff -u -r1.4.2.10 Makefile >--- src/resources/Makefile 15 Feb 2007 22:46:00 -0000 1.4.2.10 >+++ src/resources/Makefile 18 Sep 2007 20:42:57 -0000 >@@ -30,7 +30,7 @@ > UTIL_TARGETS= \ > utils/config-utils.sh utils/ra-skelet.sh utils/messages.sh \ > utils/httpd-parse-config.pl utils/tomcat-parse-config.pl \ >- utils/member_util.sh >+ utils/member_util.sh utils/refcnt.sh > > all: > >Index: src/resources/clusterfs.sh >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/src/resources/clusterfs.sh,v >retrieving revision 1.1.2.13 >diff -u -r1.1.2.13 clusterfs.sh >--- src/resources/clusterfs.sh 21 May 2007 15:56:47 -0000 1.1.2.13 >+++ src/resources/clusterfs.sh 18 Sep 2007 20:42:57 -0000 >@@ -49,6 +49,7 @@ > > > . $(dirname $0)/ocf-shellfuncs >+. $(dirname $0)/utils/refcnt.sh > > > meta_data() >@@ -133,6 +134,18 @@ > <content type="string"/> > </parameter> > >+ <parameter name="self_fence"> >+ <longdesc lang="en"> >+ If set and unmounting the file system fails, the node will >+ immediately reboot. Generally, this is used in conjunction >+ with force-unmount support, but it is not required. >+ </longdesc> >+ <shortdesc lang="en"> >+ Seppuku Unmount >+ </shortdesc> >+ <content type="boolean"/> >+ </parameter> >+ > <parameter name="fsid"> > <longdesc lang="en"> > File system ID for NFS exports. This can be overridden >@@ -661,6 +674,7 @@ > case $? in > $YES) # already mounted > ocf_log debug "$dev already mounted" >+ inc_refcnt > return $SUCCESS > ;; > $NO) # not mounted, continue >@@ -734,7 +748,8 @@ > 'mount $fstype_option $mount_options $dev $mp' failed, error=$ret_val" > return $FAIL > fi >- >+ >+ inc_refcnt > return $SUCCESS > } > >@@ -795,6 +810,15 @@ > esac > fi > >+ if [ -n "$mp" ]; then >+ case ${OCF_RESKEY_self_fence} in >+ $YES_STR) self_fence=$YES ;; >+ 1) self_fence=$YES ;; >+ *) self_fence="" ;; >+ esac >+ fi >+ >+ > # > # Always do this hackery on clustered file systems. > # >@@ -810,6 +834,14 @@ > fi > fi > >+ # >+ # Decrement the refcnt. - #254111 >+ # I >+ dec_refcnt >+ if [ $? -eq 0 ]; then >+ return $SUCCESS >+ fi >+ > # Always invalidate buffers on clusterfs resources > clubufflush -f $dev > >@@ -870,8 +902,13 @@ > done # while > > if [ -n "$umount_failed" ]; then >- ocf_log err "'umount $dev' failed ($mp), error=$ret_val" >+ ocf_log err "'umount $mp' failed, error=$ret_val" > >+ if [ "$self_fence" ]; then >+ ocf_log alert "umount failed - REBOOTING" >+ sync >+ reboot -fn >+ fi > return $FAIL > fi > >Index: src/resources/utils/refcnt.sh >=================================================================== >RCS file: src/resources/utils/refcnt.sh >diff -N src/resources/utils/refcnt.sh >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/resources/utils/refcnt.sh 18 Sep 2007 20:42:57 -0000 >@@ -0,0 +1,89 @@ >+#!/bin/bash >+# >+# Reference counts for resources which require it >+# >+ >+[ -z "$__REFCNT_DIR" ] && export __REFCNT_DIR="/var/run/cluster/rgmanager" >+ >+__test_rc_dir() >+{ >+ [ -d "$__REFCNT_DIR" ] && return 0 >+ [ -e "$__REFCNT_DIR" ] && return 1 >+ >+ mkdir -p $__REFCNT_DIR || return 1 >+ return 0 >+} >+ >+ >+# >+# Increment the reference count. Returns 0 if successful, or 1 >+# if the environment is incorrect. >+# >+# If 1 is returned, there was a failure incrementing the reference >+# count, and it should not be assumed that a second instance of this >+# resource will not take this instance out on shutdown. >+# >+inc_refcnt() >+{ >+ declare refcnt=1 >+ declare fn="$__REFCNT_DIR/$OCF_RESOURCE_INSTANCE" >+ >+ __test_rc_dir || return 1 >+ [ -n "$OCF_RESOURCE_INSTANCE" ] || return 1 >+ >+ if [ -f "$__REFCNT_DIR/$OCF_RESOURCE_INSTANCE" ]; then >+ refcnt=$(cat $fn) >+ ((++refcnt)) >+ fi >+ >+ echo $refcnt > $fn >+ return 0 >+} >+ >+ >+# >+# Decrement the reference count. Returns 0 if successful, or 1 >+# if the environment is incorrect, or the refcount would be 0 >+# >+# If 1 is returned, it's safe to assume that the reference count >+# is either 0 or there's an error, in which case, the resource >+# should be fully stopped. >+# >+dec_refcnt() >+{ >+ declare refcnt=0 >+ declare fn="$__REFCNT_DIR/$OCF_RESOURCE_INSTANCE" >+ >+ __test_rc_dir || return 1 >+ [ -n "$OCF_RESOURCE_INSTANCE" ] || return 1 >+ [ -f "$fn" ] || return 1 >+ >+ if [ -f "$__REFCNT_DIR/$OCF_RESOURCE_INSTANCE" ]; then >+ refcnt=$(cat $fn) >+ if [ $refcnt -le 1 ]; then >+ # No more references >+ rm -f $fn >+ return 1 >+ fi >+ ((--refcnt)) >+ fi >+ >+ echo $refcnt > $fn >+ return 0 >+} >+ >+ >+# >+# Clear reference count; this should be avoidable. >+# >+clr_refcnt() >+{ >+ declare refcnt=0 >+ declare fn="$__REFCNT_DIR/$OCF_RESOURCE_INSTANCE" >+ >+ __test_rc_dir || return 1 >+ [ -n "$OCF_RESOURCE_INSTANCE" ] || return 1 >+ [ -f "$fn" ] || return 1 >+ rm -f $fn >+ return 0 >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254111
:
198841
|
290066