]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon: set peon state to electing if other mons call an election
authorSage Weil <sage@inktank.com>
Sat, 13 Jul 2013 15:36:25 +0000 (08:36 -0700)
committerSage Weil <sage@inktank.com>
Mon, 15 Jul 2013 20:42:53 +0000 (13:42 -0700)
commitc67d50b86b939766f0d378e4334f177be815b6f8
treecfb48542b920cb7889f7d46c75b745ea0dcdd60a
parent3ea984cd6a9f7bc6bffe906e58802a89fb6c9093
mon: set peon state to electing if other mons call an election

Previously we would call mon->reset() and set various flags (like
exited_quorum timestamp), but the state would remain PEON.  Make an
explicit join_election() callback and set the state there, and add
asserts in reset() (renamed to be private) so that we ensure all
callers are well-behaved.

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