cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Lon Hohberger <lhh@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/2] rgmanager: Do hard shut down if CMAN dies
Date: Thu, 28 Oct 2010 17:17:26 -0400	[thread overview]
Message-ID: <1288300647-8469-1-git-send-email-lhh@redhat.com> (raw)

Resolves: rhbz#639961

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/src/clulib/msg_cluster.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/clulib/msg_cluster.c b/rgmanager/src/clulib/msg_cluster.c
index 4ec3750..8dc22d0 100644
--- a/rgmanager/src/clulib/msg_cluster.c
+++ b/rgmanager/src/clulib/msg_cluster.c
@@ -35,6 +35,8 @@
 #include <cman-private.h>
 #include <clulog.h>
 
+static void process_cman_event(cman_handle_t handle, void *private,
+			       int reason, int arg);
 /* Ripped from ccsd's setup_local_socket */
 
 int cluster_msg_close(msgctx_t *ctx);
@@ -207,7 +209,10 @@ poll_cluster_messages(int timeout)
 			return -1;
 		}
 
-		cman_dispatch(ch, 0);
+		if (cman_dispatch(ch, 0) < 0) {
+			process_cman_event(ch, NULL,
+					   CMAN_REASON_TRY_SHUTDOWN, 0);
+		}
 		ret = 0;
 	}
 	cman_unlock(ch);
-- 
1.7.2.3



             reply	other threads:[~2010-10-28 21:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-28 21:17 Lon Hohberger [this message]
2010-10-28 21:17 ` [Cluster-devel] [PATCH 2/2] rgmanager: Work around lockspace release hang Lon Hohberger
2010-10-29  6:46   ` 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=1288300647-8469-1-git-send-email-lhh@redhat.com \
    --to=lhh@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).