Skip to content

Commit ce0d6fc

Browse files
authored
Merge pull request ceph#60554 from jshen28/fix-legacy-addr-mismatch
Make mon_info_t consistent with mon_addr Reviewed-by: Ilya Dryomov <[email protected]>
2 parents 584a81c + 14b0951 commit ce0d6fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/mon/MonMap.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,12 @@ void MonMap::encode(ceph::buffer::list& blist, uint64_t con_features) const
196196
if (!HAVE_FEATURE(con_features, MONENC) ||
197197
!HAVE_FEATURE(con_features, SERVER_NAUTILUS)) {
198198
for (auto& [name, info] : mon_info) {
199-
legacy_mon_addr[name] = info.public_addrs.legacy_addr();
199+
// see note in mon_info_t::encode()
200+
auto addr = info.public_addrs.legacy_addr();
201+
if (addr == entity_addr_t()) {
202+
addr = info.public_addrs.as_legacy_addr();
203+
}
204+
legacy_mon_addr[name] = addr;
200205
}
201206
}
202207

0 commit comments

Comments
 (0)