]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: initialize quorum_features
authorSage Weil <sage@inktank.com>
Mon, 2 Jul 2012 23:05:16 +0000 (16:05 -0700)
committerSage Weil <sage@inktank.com>
Mon, 2 Jul 2012 23:05:16 +0000 (16:05 -0700)
This could cause us to incorrectly encode new features into the monstore
that an old mon won't understand.

This is overly conservative; we probably need to persist the set of quorum
features that are supported and use those.

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

index a75e307e8233999757e6b0533813977dfc33ae89..5903ac4f52daf1cac28405237725f006d5b261d4 100644 (file)
@@ -108,6 +108,7 @@ Monitor::Monitor(CephContext* cct_, string nm, MonitorStore *s, Messenger *m, Mo
   
   elector(this),
   leader(0),
+  quorum_features(0),
   probe_timeout_event(NULL),
 
   paxos(PAXOS_NUM), paxos_service(PAXOS_NUM),
@@ -974,6 +975,7 @@ void Monitor::lose_election(epoch_t epoch, set<int> &q, int l)
   leader = l;
   quorum = q;
   outside_quorum.clear();
+  quorum_features = 0;
   dout(10) << "lose_election, epoch " << epoch << " leader is mon" << leader
           << " quorum is " << quorum << dendl;