[sheepdog] [PATCH] zookeeper: print error code in lock_table_lookup_acquire()

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Jul 16 16:31:21 CEST 2015


Cc: zhanghongzhou <zhang.hongzhou at hotmail.com>
Cc: Ruoyu <liangry at ucweb.com>
Cc: Robin Dong <robin.k.dong at gmail.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 sheep/cluster/zookeeper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
index 4ad3ef9..4a2351a 100644
--- a/sheep/cluster/zookeeper.c
+++ b/sheep/cluster/zookeeper.c
@@ -352,7 +352,7 @@ static struct cluster_lock *lock_table_lookup_acquire(uint64_t lock_id)
 			 ret_lock->id);
 		rc = zk_init_node(path);
 		if (rc)
-			panic("Failed to init node %s", path);
+			panic("Failed to init node %s: %s", path, zerror(rc));
 
 		sem_init(&ret_lock->wait_wakeup, 0, 1);
 		sd_init_mutex(&ret_lock->id_lock);
-- 
1.9.1



More information about the sheepdog mailing list