Teuthology no longer puts mon addr in ceph.conf, and instead sets the
mon_host option globally. That means a different path for
ceph-monstore-tool rebuild to regenerate the monmap, and the generated
map's names need to match teuthologies.
This change fixes the teuthology rebuild test because that tests's mon
names happen to also be 'a', 'b', 'c'. It's fragile, but it works.
Signed-off-by: Sage Weil <sage@redhat.com>
// -m foo?
if (const auto mon_host = conf.get_val<std::string>("mon_host");
!mon_host.empty()) {
- auto ret = init_with_ips(mon_host, for_mkfs, "noname-");
+ // 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, for_mkfs ? "" : "noname-");
if (ret == -EINVAL) {
- ret = init_with_hosts(mon_host, for_mkfs, "noname-");
+ ret = init_with_hosts(mon_host, for_mkfs, for_mkfs ? "" : "noname-");
}
if (ret < 0) {
errout << "unable to parse addrs in '" << mon_host << "'"