Bug #18265
closedMonMap::sanitize_mons() does not like monmaps built from -m/mon_hosts
0%
Description
I have a ceph.conf that I've used for some time that declares mons with
mon_initial_members = host1, host2, host3 mon host = <host1ip>, <host2ip>, <host3ip>
It seems to me that this is a valid configuration.
Lately, this has started failing with an assert:
FAILED assert(mon_info.count(p.first))
This is in sanitize_mons(), because it's trying to verify that an incoming monmap matches the initial monmap by, among other things, asserting that the map key in the incoming map is present in 'mon_info', which is the initially-built monmap.
The problem is that the initially-built map, because it was built from ip addresses, has 'noname-{a,b,c}' in the keys, so there's no match, so the assert fires.
I hacked in code to check for a key starting with 'noname-', search for a matching entity_addr, and if found, replace the noname- map entry with one named by the incoming map entry's name, and this made the assertion go away...but I'm not at all sure it's the right sort of fix or will handle all possible initial-map or map-message cases.