before this change, the "mgr" map is not included paxos, thus why the
peon mon fails to have the mgr map after it is sync'ed with its leader.
and hence there is chance that ceph-mgr is unable to get a mgr map from
the monitor it is connected to.
Fixes: http://tracker.ceph.com/issues/22266
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
f3f2a8bad4da7fda485eba7412d40b7b5758452d)
return 0;
}
+// rebuild
+// - mgr
+// - mgr_command_desc
static int update_mgrmap(MonitorDBStore& st)
{
auto t = make_shared<MonitorDBStore::Transaction>();
if ((r = update_pgmap_meta(st))) {
return r;
}
+ if ((r = update_mgrmap(st))) {
+ return r;
+ }
if ((r = update_paxos(st))) {
return r;
}
if ((r = update_monitor(st))) {
return r;
}
- if ((r = update_mgrmap(st))) {
- return r;
- }
return 0;
}