[Sheepdog] Improve the verbose error message in log.

huxinwei huxinwei at huawei.com
Fri Mar 2 10:04:42 CET 2012


Hi List,

  Yet another trivial patch.
  I just copied over the comments for these results. It helps me to figure out the situation more easiler.

  Please consider it for inclusion.

  Thanks.

diff --git a/sheep/group.c b/sheep/group.c
index dda468c..7ed8316 100644
--- a/sheep/group.c
+++ b/sheep/group.c
@@ -1200,11 +1200,11 @@ static void sd_join_handler(struct sd_node *joined,
 
 	if (node_cmp(joined, &sys->this_node) == 0) {
 		if (result == CJ_RES_FAIL) {
-			eprintf("failed to join sheepdog cluster\n");
+			eprintf("Fail to join. The joining node has an invalid epoch.\n");
 			sys->cdrv->leave();
 			exit(1);
 		} else if (result == CJ_RES_JOIN_LATER) {
-			eprintf("failed to join sheepdog cluster: please retry when master is up\n");
+			eprintf("Fail to join. The joining node should be added after the cluster start working.\n");
 			sys->cdrv->leave();
 			exit(1);
 		}



More information about the sheepdog mailing list