We were getting a dup addr from -m <foo> and ceph.conf. Prefer the
ceph.conf name in this case.
Also check for dup names here just to be thorough (even though I don't
think that can come up currently).
Fixes: #2464
Signed-off-by: Sage Weil <sage@newdream.net>
continue;
}
if (addr.get_port() == 0)
- addr.set_port(CEPH_MON_PORT);
+ addr.set_port(CEPH_MON_PORT);
+
+ // the make sure this mon isn't already in the map
+ if (contains(addr))
+ remove(get_name(addr));
+ if (contains(*m))
+ remove(*m);
+
add(m->c_str(), addr);
}