]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-mon: keep v1 address type when explicitly set 32028/head
authorRicardo Dias <rdias@suse.com>
Wed, 20 Nov 2019 10:42:18 +0000 (10:42 +0000)
committerNathan Cutler <ncutler@suse.com>
Thu, 5 Dec 2019 13:40:55 +0000 (14:40 +0100)
Fixes: https://tracker.ceph.com/issues/42906
Signed-off-by: Ricardo Dias <rdias@suse.com>
(cherry picked from commit a97893e409050afcedb6e77c06e09d5b8a11b8d0)

src/ceph_mon.cc

index f51dce57e62f1aaebd572018deb29b673ae2f421..2d73294b4096fb483530117eb1f5b878d7296b51 100644 (file)
@@ -194,9 +194,11 @@ entity_addrvec_t make_mon_addrs(entity_addr_t a)
   } else if (a.get_port() == CEPH_MON_PORT_LEGACY) {
     a.set_type(entity_addr_t::TYPE_LEGACY);
     addrs.v.push_back(a);
-  } else {
+  } else if (a.get_type() == entity_addr_t::TYPE_ANY) {
     a.set_type(entity_addr_t::TYPE_MSGR2);
     addrs.v.push_back(a);
+  } else {
+    addrs.v.push_back(a);
   }
   return addrs;
 }