]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
remove the restriction of address type in init_with_hosts when build initial monmap 31690/head 31691/head
authorHao Xiong <hxiaong@ebay.com>
Sun, 17 Nov 2019 05:41:04 +0000 (13:41 +0800)
committerhxiaong <hxiaong@ebay.com>
Sun, 17 Nov 2019 09:33:28 +0000 (17:33 +0800)
Signed-off-by: Hao Xiong <hxiaong@ebay.com>
src/mon/MonMap.cc

index d63bada0fd6fef8b07fb971fb0830dddeb2ed2d1..d35f20eb282c6a152ea8871bf13f63846be6defe 100644 (file)
@@ -503,7 +503,7 @@ int MonMap::init_with_hosts(const std::string& hostlist,
   vector<entity_addrvec_t> addrs;
   bool success = parse_ip_port_vec(
     hosts, addrs,
-    for_mkfs ? entity_addr_t::TYPE_MSGR2 : entity_addr_t::TYPE_ANY);
+    entity_addr_t::TYPE_ANY);
   free(hosts);
   if (!success)
     return -EINVAL;
@@ -516,8 +516,10 @@ int MonMap::init_with_hosts(const std::string& hostlist,
     string name = prefix;
     name += n;
     if (addrs[i].v.size() == 1) {
-      _add_ambiguous_addr(name, addrs[i].front(), 0, 0, false);
+      _add_ambiguous_addr(name, addrs[i].front(), 0, 0, for_mkfs);
     } else {
+      // they specified an addrvec, so let's assume they also specified
+      // the addr *type* and *port*.  (we could possibly improve this?)
       add(name, addrs[i], 0);
     }
   }