FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 06-28-2012, 07:57 PM
Ryan McCabe
 
Default rgmanager: Don't exit uncleanly when cman asks us to shut down.

Original patch from Lon rediffed to apply to the current tree:

"Previous to this, rgmanager would uncleanly exit if you
issued a 'service cman stop'. This patch makes it uncleanly
exit if 'cman_tool leave force' or a corosync/openais crash
occurs, but in a simple cman_tool leave, rgmanager will no
longer exit uncleanly."

Without this patch, issuing 'service cman stop' when rgmanager
is running will make it impossible to stop the cman service because
rgmanager will have exited without releasing its dlm lockspace.

Resolves: rhbz#769730

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
rgmanager/src/clulib/msg_cluster.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
index 8dc22d0..e864853 100644
--- a/rgmanager/src/clulib/msg_cluster.c
+++ b/rgmanager/src/clulib/msg_cluster.c
@@ -211,7 +211,7 @@ poll_cluster_messages(int timeout)

if (cman_dispatch(ch, 0) < 0) {
process_cman_event(ch, NULL,
- CMAN_REASON_TRY_SHUTDOWN, 0);
+ CMAN_REASON_TRY_SHUTDOWN, 1);
}
ret = 0;
}
@@ -987,6 +987,11 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg)
printf("EVENT: %p %p %d %d
", handle, private, reason, arg);
#endif

+ if (reason == CMAN_REASON_TRY_SHUTDOWN && !arg) {
+ cman_replyto_shutdown(handle, 0);
+ return;
+ }
+
/* Allocate queue node */
while ((node = malloc(sizeof(*node))) == NULL) {
sleep(1);
--
1.7.10.2
 
Old 07-04-2012, 11:05 AM
"Fabio M. Di Nitto"
 
Default rgmanager: Don't exit uncleanly when cman asks us to shut down.

ACK

On 6/28/2012 9:57 PM, Ryan McCabe wrote:
> Original patch from Lon rediffed to apply to the current tree:
>
> "Previous to this, rgmanager would uncleanly exit if you
> issued a 'service cman stop'. This patch makes it uncleanly
> exit if 'cman_tool leave force' or a corosync/openais crash
> occurs, but in a simple cman_tool leave, rgmanager will no
> longer exit uncleanly."
>
> Without this patch, issuing 'service cman stop' when rgmanager
> is running will make it impossible to stop the cman service because
> rgmanager will have exited without releasing its dlm lockspace.
>
> Resolves: rhbz#769730
>
> Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
> ---
> rgmanager/src/clulib/msg_cluster.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
> index 8dc22d0..e864853 100644
> --- a/rgmanager/src/clulib/msg_cluster.c
> +++ b/rgmanager/src/clulib/msg_cluster.c
> @@ -211,7 +211,7 @@ poll_cluster_messages(int timeout)
>
> if (cman_dispatch(ch, 0) < 0) {
> process_cman_event(ch, NULL,
> - CMAN_REASON_TRY_SHUTDOWN, 0);
> + CMAN_REASON_TRY_SHUTDOWN, 1);
> }
> ret = 0;
> }
> @@ -987,6 +987,11 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg)
> printf("EVENT: %p %p %d %d
", handle, private, reason, arg);
> #endif
>
> + if (reason == CMAN_REASON_TRY_SHUTDOWN && !arg) {
> + cman_replyto_shutdown(handle, 0);
> + return;
> + }
> +
> /* Allocate queue node */
> while ((node = malloc(sizeof(*node))) == NULL) {
> sleep(1);
>
 

Thread Tools




All times are GMT. The time now is 08:27 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org