From: Sage Weil Date: Tue, 9 Jul 2013 00:46:40 +0000 (-0700) Subject: mon/OSDMonitor: fix base case for loading full osdmap X-Git-Tag: v0.67-rc1~138^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=43fa7aabf1f7e5deb844c1f52d451bab9e7d1006;p=ceph.git mon/OSDMonitor: fix base case for loading full osdmap Right after cluster creation, first_committed is 1 and latest stashed in 0, but we don't have the initial full map yet. Thereafter, we do (because we write it with trim). Fixes afd6c7d8247075003e5be439ad59976c3d123218. Signed-off-by: Sage Weil Reviewed-by: Joao Eduardo Luis --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 3669486605c3..d6426e4e4932 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -122,7 +122,9 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap) * due to encode_trim_extra(), which includes the oldest full map in the trim * transaction. Start with whichever is newer. */ - version_t latest_full = MAX(get_version_latest_full(), get_first_committed()); + version_t latest_full = get_version_latest_full(); + if (latest_full == 0 && get_first_committed() > 1) + latest_full = get_first_committed(); if ((latest_full > 0) && (latest_full > osdmap.epoch)) { bufferlist latest_bl; get_version_full(latest_full, latest_bl);