This reverts commit
c078c810313ece647db6d9056c0eca5256a91a34.
# Conflicts:
# src/mon/MonMap.cc
The ceph_mon.cc bootstrap code expects a noname- prefix to identify which
unamed mons (i.e., generated from mon_host) in the initial monmap can be
taken over as itself.
At the same time, the mon recovery code needs a way to know how to name
the monitors.
Signed-off-by: Sage Weil <sage@redhat.com>
n[0] = 'a' + i;
n[1] = 0;
string name;
- if (!for_mkfs) {
- name = prefix;
- }
+ name = prefix;
name += n;
_add_ambiguous_addr(name, addrs[i], 0, for_mkfs);
}
// -m foo?
if (const auto mon_host = conf.get_val<std::string>("mon_host");
!mon_host.empty()) {
- // NOTE: the for_mkfs path here is dodgey.. it assumes the mons will be
- // named 'a', 'b', 'c'.
auto ret = init_with_ips(mon_host, for_mkfs, "noname-");
if (ret == -EINVAL) {
ret = init_with_hosts(mon_host, for_mkfs, "noname-");