mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
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:
parent
9c70829604
commit
55088f7bbe
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user