[Sheepdog] [PATCH 2/4] sheep: move eprintf in update_cluster_info()
Liu Yuan
namei.unix at gmail.com
Sun Sep 18 05:33:28 CEST 2011
From: Liu Yuan <tailai.ly at taobao.com>
If node is already joined, we lose the changce to see log information. So
move it forward in a better place.
Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
---
sheep/group.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sheep/group.c b/sheep/group.c
index ee12cf3..032d44c 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -606,6 +606,7 @@ static void update_cluster_info(struct join_message *msg)
int ret, nr_nodes = msg->nr_nodes;
struct sheepdog_node_list_entry entry[SD_MAX_NODES];
+ eprintf("status = %d, epoch = %d, %d, %d\n", msg->cluster_status, msg->epoch, msg->result, sys->join_finished);
if (msg->result != SD_RES_SUCCESS) {
if (is_myself(msg->header.from.addr, msg->header.from.port)) {
eprintf("failed to join sheepdog, %d\n", msg->result);
@@ -639,7 +640,6 @@ static void update_cluster_info(struct join_message *msg)
sys->join_finished = 1;
- eprintf("system status = %d, epoch = %d\n", msg->cluster_status, sys->epoch);
if (msg->cluster_status == SD_STATUS_OK && msg->inc_epoch) {
nr_nodes = get_ordered_sd_node_list(entry);
--
1.7.5.1
More information about the sheepdog
mailing list