From d145fcd7d4e18d6c60a4c84553b61ce905fe4312 Mon Sep 17 00:00:00 2001 From: renhwztetecs Date: Thu, 7 Jul 2016 23:05:25 +0800 Subject: [PATCH] mon/mds: add err info when load_metadata is abnormal add a print of the most important reason is that: when the MDSMonitor::init call MDSMonitor::load_metadata, no processing error code, so printing can discover problems Signed-off-by: huanwen ren --- src/mon/MDSMonitor.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index ec6f5e37d751..b6eed8505f65 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -2641,8 +2641,10 @@ int MDSMonitor::load_metadata(map& m) { bufferlist bl; int r = mon->store->get(MDS_METADATA_PREFIX, "last_metadata", bl); - if (r) + if (r) { + dout(1) << "Unable to load 'last_metadata'" << dendl; return r; + } bufferlist::iterator it = bl.begin(); ::decode(m, it); -- 2.47.3