]> 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 31844/head
authorHao Xiong <hxiaong@ebay.com>
Sun, 17 Nov 2019 05:41:04 +0000 (13:41 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 26 Nov 2019 07:15:46 +0000 (08:15 +0100)
Signed-off-by: Hao Xiong <hxiaong@ebay.com>
(cherry picked from commit 0c2da4b21a4df379f580472dc418809eb7622ee0)

Conflicts:
src/mon/MonMap.cc
bf7490bf7c0e11e7f7630ddc4f0f831a42ba4c12 ("mon/MonMap: add weight to
  mon_info_t") will not be backported

src/mon/MonMap.cc

index f03193e044dd000f3ad70cd55da08cb7d9480fbd..687c3f8691060c7b4298eb5c0d89f32c6c3e7934 100644 (file)
@@ -491,7 +491,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;
@@ -504,8 +504,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);
+      _add_ambiguous_addr(name, addrs[i].front(), 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);
     }
   }