]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mon: MonMap: mon addr and all now held by mon_info_t
authorJoao Eduardo Luis <joao@suse.de>
Fri, 27 Nov 2015 18:41:07 +0000 (18:41 +0000)
committerJoao Eduardo Luis <joao@suse.de>
Wed, 2 Nov 2016 23:50:12 +0000 (23:50 +0000)
commitaf3aaaebb18a474591d7bc08ade4b2d348c19116
tree32c169bc6b7b0e78ffedd25dc98b4aad13391a77
parent2ee1b9a4084f1613f3d28a06744c0866278ab7d6
mon: MonMap: mon addr and all now held by mon_info_t

Instead of keeping several maps mapping back and forth from string to
entity_addr_t for each monitor, have the monitor's address and name in
purpose-specific class, mon_info_t, and everything references it
instead.

Although the benefits may not be obvious right now, it will allow us to
add other ip addresses for the monitors a bit more easily, instead of
having to kludge around the existing structures.

We also keep compatibility with older versions by maintaining the
traditional 'mon_addr' map. This is a logical change inside the monitor,
so we can easily accomodate older monitors without having to rely on
quorum features; just needs a bit of care and foo.

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
src/mon/MonMap.cc
src/mon/MonMap.h