mon/MgrMonitor: feed our MgrClient MgrMaps

We don't have a MonClient so we don't subscribe to these in the
usual way.  This will do.

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2017-02-24 22:28:25 -05:00
parent 9c70829604
commit 55088f7bbe

View File

@ -33,23 +33,24 @@ void MgrMonitor::create_initial()
void MgrMonitor::update_from_paxos(bool *need_bootstrap)
{
version_t version = get_last_committed();
if (version == map.epoch) {
return;
if (version != map.epoch) {
dout(4) << "loading version " << version << dendl;
bufferlist bl;
int err = get_version(version, bl);
assert(err == 0);
bufferlist::iterator p = bl.begin();
map.decode(p);
dout(4) << "active server: " << map.active_addr
<< "(" << map.active_gid << ")" << dendl;
check_subs();
}
dout(4) << "loading version " << version << dendl;
bufferlist bl;
int err = get_version(version, bl);
assert(err == 0);
bufferlist::iterator p = bl.begin();
map.decode(p);
dout(4) << "active server: " << map.active_addr
<< "(" << map.active_gid << ")" << dendl;
check_subs();
// feed our pet MgrClient
mon->mgr_client.ms_dispatch(new MMgrMap(map));
}
void MgrMonitor::create_pending()