[sheepdog] [PATCH] cluster/local: don't process leave event of gateway node
MORITA Kazutaka
morita.kazutaka at gmail.com
Fri May 10 16:33:23 CEST 2013
From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
We must not call sd_leave_handler() when the gateway node leaves cluster. It is
because we already processed the event when the node became gateway.
The local driver can pass tests/048 with this patch.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
sheep/cluster/local.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sheep/cluster/local.c b/sheep/cluster/local.c
index 142221f..ae7941b 100644
--- a/sheep/cluster/local.c
+++ b/sheep/cluster/local.c
@@ -473,6 +473,12 @@ static bool local_process_event(void)
ev->join_result, ev->buf);
break;
case EVENT_LEAVE:
+ if (ev->sender.gateway) {
+ sd_dprintf("gateway %s left sheepdog",
+ lnode_to_str(&ev->sender));
+ break;
+ }
+ /* fall through */
case EVENT_GATEWAY:
sd_leave_handler(&ev->sender.node, nodes, nr_nodes);
break;
--
1.7.9.5
More information about the sheepdog
mailing list