]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon: collect mon metadata as part of election
authorSage Weil <sage@redhat.com>
Thu, 6 Jul 2017 19:32:20 +0000 (15:32 -0400)
committerSage Weil <sage@redhat.com>
Fri, 7 Jul 2017 15:34:47 +0000 (11:34 -0400)
commit49c1be8774529f2b701effae36d1ecee9bb85b06
treec4d1ee054ce6f12a95aeecafc3749efd64205760
parentb47db49b5a539a4ed1cb37d9867edd7fc027ac59
mon: collect mon metadata as part of election

Previously each peon would send a message to teh leader with its metadata
immediately after the election was won.  However, at that point paxos
usually wasn't writeable, which meant the old update_mon_metadata() method
didn't persist reliably, updates would race, and generally speaking
metadata wasn't reliably updated.

Fix this by including metadata as part of the election ack, and persisting
the whole quorum when the election is won.  This ensures it is up to date.

Fixes: http://tracker.ceph.com/issues/20434
Signed-off-by: Sage Weil <sage@redhat.com>
src/messages/MMonElection.h
src/mon/Elector.cc
src/mon/Elector.h
src/mon/Monitor.cc
src/mon/Monitor.h