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 290066 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]
Adds reference count support to rgmanager & refcount checking to clusterfs.sh
rgmanager-clusterfs-refcnt.patch (text/plain), 4.03 KB, created by
Lon Hohberger
on 2007-12-19 20:59:34 UTC
(
hide
)
Description:
Adds reference count support to rgmanager & refcount checking to clusterfs.sh
Filename:
MIME Type:
Creator:
Lon Hohberger
Created:
2007-12-19 20:59:34 UTC
Size:
4.03 KB
patch
obsolete
>Index: include/res-ocf.h >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/include/res-ocf.h,v >retrieving revision 1.1.16.3 >diff -u -r1.1.16.3 res-ocf.h >--- include/res-ocf.h 18 Dec 2007 17:52:56 -0000 1.1.16.3 >+++ include/res-ocf.h 19 Dec 2007 20:56:34 -0000 >@@ -31,7 +31,7 @@ > #define OCF_RESOURCE_INSTANCE_STR "OCF_RESOURCE_INSTANCE" > #define OCF_CHECK_LEVEL_STR "OCF_CHECK_LEVEL" > #define OCF_RESOURCE_TYPE_STR "OCF_RESOURCE_TYPE" >-#define OCF_RECFNT_STR "OCF_RESKEY_RGMANAGER_meta_refcnt" >+#define OCF_REFCNT_STR "OCF_RESKEY_RGMANAGER_meta_refcnt" > > /* > LSB return codes >Index: src/daemons/restree.c >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/restree.c,v >retrieving revision 1.23.2.13 >diff -u -r1.23.2.13 restree.c >--- src/daemons/restree.c 26 Nov 2007 21:46:27 -0000 1.23.2.13 >+++ src/daemons/restree.c 19 Dec 2007 20:56:34 -0000 >@@ -130,7 +130,7 @@ > @see build_env > */ > static void >-add_ocf_stuff(resource_t *res, char **env, int depth) >+add_ocf_stuff(resource_t *res, char **env, int depth, int refcnt) > { > char ver[10]; > char *minor, *val; >@@ -214,6 +214,17 @@ > return; > snprintf(val, n, "%s=%s", OCF_CHECK_LEVEL_STR, ver); > *env = val; env++; >+ >+ /* >+ Store the resource local refcnt (0 for now) >+ */ >+ snprintf(ver, sizeof(ver), "%d", refcnt); >+ n = strlen(OCF_REFCNT_STR) + strlen(ver) + 2; >+ val = malloc(n); >+ if (!val) >+ return; >+ snprintf(val, n, "%s=%s", OCF_REFCNT_STR, ver); >+ *env = val; env++; > } > > >@@ -227,7 +238,7 @@ > @see kill_env res_exec add_ocf_stuff > */ > static char ** >-build_env(resource_node_t *node, int depth) >+build_env(resource_node_t *node, int depth, int refcnt) > { > resource_t *res = node->rn_resource; > char **env; >@@ -235,7 +246,7 @@ > int x, attrs, n; > > for (attrs = 0; res->r_attrs && res->r_attrs[attrs].ra_name; attrs++); >- attrs += 7; /* >+ attrs += 8; /* > Leave space for: > OCF_RA_VERSION_MAJOR > OCF_RA_VERSION_MINOR >@@ -243,6 +254,7 @@ > OCF_RESOURCE_INSTANCE > OCF_RESOURCE_TYPE > OCF_CHECK_LEVEL >+ OCF_RESKEY_RGMANAGER_meta_refcnt > (null terminator) > */ > >@@ -282,7 +294,7 @@ > ++attrs; > } > >- add_ocf_stuff(res, &env[attrs], depth); >+ add_ocf_stuff(res, &env[attrs], depth, refcnt); > > return env; > } >@@ -345,7 +357,7 @@ > return 0; > > #ifdef DEBUG >- env = build_env(node, depth); >+ env = build_env(node, depth, node->rn_resource->r_incarnations); > if (!env) > return -errno; > #endif >@@ -374,7 +386,7 @@ > #endif > > #ifndef DEBUG >- env = build_env(node, depth); >+ env = build_env(node, depth, node->rn_resource->r_incarnations); > #endif > > if (!env) >@@ -1063,7 +1075,8 @@ > > /* Ok, it's a 'status' action. See if enough time has > elapsed for a given type of status action */ >- if (delta < node->rn_actions[x].ra_interval) >+ if (delta < node->rn_actions[x].ra_interval || >+ !node->rn_actions[x].ra_interval) > continue; > > if (idx == -1 || >Index: src/resources/clusterfs.sh >=================================================================== >RCS file: /cvs/cluster/cluster/rgmanager/src/resources/clusterfs.sh,v >retrieving revision 1.15.2.6 >diff -u -r1.15.2.6 clusterfs.sh >--- src/resources/clusterfs.sh 19 Dec 2007 20:53:35 -0000 1.15.2.6 >+++ src/resources/clusterfs.sh 19 Dec 2007 20:56:34 -0000 >@@ -766,6 +766,7 @@ > typeset -i try=1 > typeset -i max_tries=3 # how many times to try umount > typeset -i sleep_time=2 # time between each umount failure >+ typeset -i refs=0 > typeset done="" > typeset umount_failed="" > typeset force_umount="" >@@ -820,6 +821,18 @@ > esac > fi > >+ # >+ # Check the rgmanager-supplied reference count if one exists. >+ # If the reference count is <= 1, we can safely proceed >+ # >+ if [ -n "$OCF_RESKEY_RGMANAGER_meta_refcnt" ]; then >+ refs=$OCF_RESKEY_RGMANAGER_meta_refcnt >+ if [ $refs -gt 1 ]; then >+ ((refs--)) >+ ocf_log debug "Not unmounting $OCF_RESOURCE_INSTANCE - still in use by $refs other service(s)" >+ return $OCF_SUCCESS >+ fi >+ fi > > # > # Always do this hackery on clustered file systems.
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