Merge pull request #12463 from wjwithagen/wip-wjw-freebsd-osd-avoidports

FreeBSD/OSD.cc: add client_messenger to the avoid_ports set.

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Yuri Weinstein 2016-12-15 14:41:34 -08:00 committed by GitHub
commit 8d7d5ae3ff

View File

@ -7172,6 +7172,12 @@ void OSD::_committed_osd_maps(epoch_t first, epoch_t last, MOSDMap *m)
start_waiting_for_healthy();
set<int> avoid_ports;
#if defined(__FreeBSD__)
// prevent FreeBSD from grabbing the client_messenger port during
// rebinding. In which case a cluster_meesneger will connect also
// to the same port
avoid_ports.insert(client_messenger->get_myaddr().get_port());
#endif
avoid_ports.insert(cluster_messenger->get_myaddr().get_port());
avoid_ports.insert(hb_back_server_messenger->get_myaddr().get_port());
avoid_ports.insert(hb_front_server_messenger->get_myaddr().get_port());