Merge pull request #31765 from rjfd/wip-fix-mon-public-addr

ceph-mon: keep v1 address type when explicitly set

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Joao Eduardo Luis <joao@suse.de>
This commit is contained in:
Kefu Chai 2019-12-05 15:51:53 +08:00 committed by GitHub
commit dea9acd4cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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;
}