[prev in list] [next in list] [prev in thread] [next in thread]
List: redhat-linux-cluster
Subject: [Linux-cluster] [PATCH] Fix qdiskd re-registration
From: Lon Hohberger <lhh () redhat ! com>
Date: 2009-05-22 14:12:53
Message-ID: 1243001573.8430.115.camel () ayanami
[Download RAW message or body]
Hi Chrissie,
This (I think) should fix the qdiskd registration issue.
-- Lon
["s3-qdisk-reregister.patch" (s3-qdisk-reregister.patch)]
diff --git a/cman/qdisk/main.c b/cman/qdisk/main.c
index a6be5a8..83892a3 100644
--- a/cman/qdisk/main.c
+++ b/cman/qdisk/main.c
@@ -1777,29 +1777,32 @@ main(int argc, char **argv)
if (!_running)
goto out;
-
- cman_register_quorum_device(ctx.qc_cman_admin,
- (ctx.qc_flags&RF_CMAN_LABEL)?
- ctx.qc_cman_label:
- ctx.qc_device,
- ctx.qc_votes);
- /*
- XXX this always returns -1 / EBUSY even when it works?!!!
-
- if ((rv = cman_register_quorum_device(ctx.qc_cman_admin, ctx.qc_device,
- ctx.qc_votes)) < 0) {
+
+ while ((rv = cman_register_quorum_device(ctx.qc_cman_admin,
+ (ctx.qc_flags&RF_CMAN_LABEL)?
+ ctx.qc_cman_label:
+ ctx.qc_device,
+ ctx.qc_votes)) < 0) {
+
+ if (errno == EBUSY) {
+ cman_poll_quorum_device(ctx.qc_cman_admin, 0);
+ cman_unregister_quorum_device(ctx.qc_cman_admin);
+ continue;
+ }
+
logt_print(LOG_CRIT,
"Could not register %s with CMAN; "
"return = %d; error = %s\n",
ctx.qc_device, rv, strerror(errno));
goto out;
}
- */
io_nanny_start(ctx.qc_tko * ctx.qc_interval);
- if (quorum_loop(&ctx, ni, MAX_NODES_DISK) == 0)
+ if (quorum_loop(&ctx, ni, MAX_NODES_DISK) == 0) {
+ cman_poll_quorum_device(ctx.qc_cman_admin, 0);
cman_unregister_quorum_device(ctx.qc_cman_admin);
+ }
io_nanny_stop();
--
Linux-cluster mailing list
Linux-cluster@redhat.com
https://www.redhat.com/mailman/listinfo/linux-cluster
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic