From f4398d2e6c245e3f81a6038425e1b8372b265b8c Mon Sep 17 00:00:00 2001 From: Vicente Cheng Date: Fri, 27 Mar 2015 18:49:28 +0800 Subject: [PATCH] Fixed the ceph get mdsmap assertion. When we want to get mdsmap, we try to get_version() and the return value err = 0 means success. The assert verified r == 0. r would not change in this flow. It always meet assert and lead mon failure. I think this verify should be: assert(err == 0) It will help to check return value of get_version(). If you have any questions, feel free to let me know. Thanks! Signed-off-by: Vicente Cheng --- src/mon/MDSMonitor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 6c4d13c9edaa..c76f8b644c93 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -777,7 +777,7 @@ bool MDSMonitor::preprocess_command(MMonCommand *m) if (err == -ENOENT) { r = -ENOENT; } else { - assert(r == 0); + assert(err == 0); assert(b.length()); MDSMap mm; mm.decode(b); -- 2.47.3