]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: fix MSG_MGR_MAP handling 20973/head
authorGu Zhongyan <guzhongyan@360.cn>
Wed, 14 Mar 2018 07:08:05 +0000 (15:08 +0800)
committerPrashant D <pdhange@redhat.com>
Tue, 20 Mar 2018 10:33:56 +0000 (06:33 -0400)
ceph config show mgr.x doesn't work
root cause is mgr daemon's mgrc has no chance
to process MSG_MGR_MAP in the mgr daemon's
ms_dispatch.

fix is let this message pass through for mgrc

Signed-off-by: Gu Zhongyan <guzhongyan@360.cn>
Signed-off-by: yupeng chen chenyupeng-it@360.cn
(cherry picked from commit f04190ed11700fd2c701799d2c867cf299a5f1b2)

Conflicts:
src/mgr/MgrStandby.cc: resolved in ms_dispatch

src/mgr/MgrStandby.cc

index 171add02f8761106d2e972d391ac9288705ca171..2317a4fc76a063e68b682a51382d8d1f5c8af408 100644 (file)
@@ -369,6 +369,7 @@ void MgrStandby::handle_mgr_map(MMgrMap* mmap)
 bool MgrStandby::ms_dispatch(Message *m)
 {
   Mutex::Locker l(lock);
+  bool handled = false;
   dout(4) << state_str() << " " << *m << dendl;
 
   if (m->get_type() == MSG_MGR_MAP) {
@@ -377,12 +378,17 @@ bool MgrStandby::ms_dispatch(Message *m)
   } else if (active_mgr) {
     auto am = active_mgr;
     lock.Unlock();
-    bool handled = am->ms_dispatch(m);
+    handled = am->ms_dispatch(m);
     lock.Lock();
     return handled;
   } else {
     return false;
   }
+  if (m->get_type() == MSG_MGR_MAP) {
+    // let this pass through for mgrc
+    handled = false;
+  }
+  return handled;
 }