Skip to content

Commit

Permalink
Merge pull request #14442 from liewegas/wip-midkraken-upgrade
Browse files Browse the repository at this point in the history
mon/OSDMonitor: tolerate upgrade from post-kraken dev cluster

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
liewegas committed Apr 23, 2017
2 parents 44cd43d + 32b1b04 commit 0d368d2
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/mon/OSDMonitor.cc
Expand Up @@ -304,12 +304,17 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
ceph::features::mon::FEATURE_LUMINOUS)) {
bufferlist bl;
mon->store->get(OSD_PG_CREATING_PREFIX, "creating", bl);
auto p = bl.begin();
std::lock_guard<std::mutex> l(creating_pgs_lock);
creating_pgs.decode(p);
dout(7) << __func__ << " loading creating_pgs last_scan_epoch "
<< creating_pgs.last_scan_epoch
<< " with " << creating_pgs.pgs.size() << " pgs" << dendl;
if (bl.length()) {
auto p = bl.begin();
std::lock_guard<std::mutex> l(creating_pgs_lock);
creating_pgs.decode(p);
dout(7) << __func__ << " loading creating_pgs last_scan_epoch "
<< creating_pgs.last_scan_epoch
<< " with " << creating_pgs.pgs.size() << " pgs" << dendl;
} else {
dout(1) << __func__ << " missing creating pgs; upgrade from post-kraken?"
<< dendl;
}
}

// walk through incrementals
Expand All @@ -321,7 +326,8 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
assert(err == 0);
assert(inc_bl.length());

dout(7) << "update_from_paxos applying incremental " << osdmap.epoch+1 << dendl;
dout(7) << "update_from_paxos applying incremental " << osdmap.epoch+1
<< dendl;
OSDMap::Incremental inc(inc_bl);
err = osdmap.apply_incremental(inc);
assert(err == 0);
Expand Down

0 comments on commit 0d368d2

Please sign in to comment.