[sheepdog] [PATCH stable-0.8] sheep/cluster: fix error in sheep log

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Aug 14 07:56:30 CEST 2014


From: Bingpeng Zhu <nkuzbp at foxmail.com>

zk_timeout is measured in milliseconds, so
it should be divided by 1000 to seconds.

Signed-off-by: Bingpeng Zhu <bingpeng.zbp at alibaba-inc.com>
---
 sheep/cluster/zookeeper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
index c99d5d0..a8bc168 100644
--- a/sheep/cluster/zookeeper.c
+++ b/sheep/cluster/zookeeper.c
@@ -971,7 +971,8 @@ static int zk_join(const struct sd_node *myself,
 	rc = zk_node_exists(path);
 	if (rc == ZOK) {
 		sd_err("Previous zookeeper session exist, shoot myself. Please "
-		       "wait for %d seconds to join me again.", zk_timeout);
+			"wait for %d seconds to join me again.",
+			DIV_ROUND_UP(zk_timeout, 1000));
 		exit(1);
 	}
 
-- 
1.8.3.2




More information about the sheepdog mailing list