From: Ryan McCabe <rmccabe@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] rgmanager: Exit uncleanly only when CMAN_SHUTDOWN_ANYWAY is set
Date: Fri, 27 Jul 2012 13:07:15 -0400 [thread overview]
Message-ID: <20120727170712.GA148843@redhat.com> (raw)
Only exit uncleanly when the CMAN_SHUTDOWN_ANYWAY flag is set in the
argument passed when handling the CMAN_REASON_TRY_SHUTDOWN event.
This fixes the case where args is 2, where we want to refuse to
shut down.
Resolves: rhbz#769730
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
rgmanager/src/clulib/msg_cluster.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
index e864853..e4b6b39 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, 1);
+ CMAN_REASON_TRY_SHUTDOWN, CMAN_SHUTDOWN_ANYWAY);
}
ret = 0;
}
@@ -987,7 +987,9 @@ process_cman_event(cman_handle_t handle, void *private, int reason, int arg)
printf("EVENT: %p %p %d %d\n", handle, private, reason, arg);
#endif
- if (reason == CMAN_REASON_TRY_SHUTDOWN && !arg) {
+ if (reason == CMAN_REASON_TRY_SHUTDOWN &&
+ !(arg & CMAN_SHUTDOWN_ANYWAY))
+ {
cman_replyto_shutdown(handle, 0);
return;
}
--
1.7.11.2
next reply other threads:[~2012-07-27 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-27 17:07 Ryan McCabe [this message]
2012-07-27 19:33 ` [Cluster-devel] [PATCH] rgmanager: Exit uncleanly only when CMAN_SHUTDOWN_ANYWAY is set Fabio M. Di Nitto
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=20120727170712.GA148843@redhat.com \
--to=rmccabe@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: link
Be 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 NNTP newsgroup(s).