]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental 1171/head
authorSage Weil <sage@inktank.com>
Thu, 30 Jan 2014 23:13:05 +0000 (15:13 -0800)
committerSage Weil <sage@inktank.com>
Thu, 30 Jan 2014 23:13:05 +0000 (15:13 -0800)
Each monitor is independently encoding the full OSDMap and storing it in
its local store.  Sometime this happens when we do not have a valid value
for quorum_features (for example, it can happen during sync).

Instead, use the feature bits the Incremental was encoded with for the full
OSDMap so that they always match.

Note that this conveniently the *only* place in the mon where we encode
the full OSDMap, so we're capturing all paths.  Yay!

Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/OSDMonitor.cc

index c73a28458124dfab545455576feb65f1e7d0e275..8bf63ccdc5a8bd0b1d7b30fa2cc3415d8216ff42 100644 (file)
@@ -203,7 +203,7 @@ void OSDMonitor::update_from_paxos(bool *need_bootstrap)
 
     // write out the full map for all past epochs
     bufferlist full_bl;
-    osdmap.encode(full_bl, mon->quorum_features);
+    osdmap.encode(full_bl, inc.encode_features);
     tx_size += full_bl.length();
 
     put_version_full(t, osdmap.epoch, full_bl);