[Sheepdog] [PATCH] sheep: don't exit when sheep calls leave_cluster()

Liu Yuan namei.unix at gmail.com
Thu Nov 24 04:55:01 CET 2011


From: Liu Yuan <tailai.ly at taobao.com>

When some unrecoverable error happens, sheep daemon will leave the cluster but stay
as a gate to redirect requests.

For e.g, fllowing case is sheep meets an EIO
...
Nov 24 10:36:15 do_io_request(785) failed: 2, 2, 7c2b2500000000 , 1, 3
Nov 24 10:36:15 io_op_done(147) leaving sheepdog cluster
Nov 24 10:36:15 sd_leave_handler(1291) network partition bug: this sheep should have exited
Nov 24 10:36:15 log_sigsegv(358) logger pid 8255 exiting abnormally
...

Thit has nothing to do with network partition stuff.

Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
 sheep/group.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/sheep/group.c b/sheep/group.c
index f126de5..31d1f76 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -1287,9 +1287,6 @@ static void sd_leave_handler(struct sheepdog_node_list_entry *left,
 	struct work_leave *w = NULL;
 	int i, size;
 
-	if (node_cmp(left, &sys->this_node) == 0)
-		panic("network partition bug: this sheep should have exited\n");
-
 	dprintf("leave %s\n", node_to_str(left));
 	for (i = 0; i < nr_members; i++)
 		dprintf("[%x] %s\n", i, node_to_str(members + i));
-- 
1.7.8.rc3




More information about the sheepdog mailing list