In some setup, binding to public_addr causes error:
NetHandler create_socket couldn't create socket (97) Address family not supported by protocol
Fixes: https://tracker.ceph.com/issues/41034
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
for (int i=0; i<num_client; i++) {
messengers[i] = Messenger::create_client_messenger(g_ceph_context,
"synclient");
- messengers[i]->bind(g_conf()->public_addr);
mclients[i] = new MonClient(g_ceph_context, poolctx);
mclients[i]->build_initial_monmap();
auto client = new StandaloneClient(messengers[i], mclients[i], poolctx);
int MDSUtility::init()
{
// Initialize Messenger
- int r = messenger->bind(g_conf()->public_addr);
- if (r < 0)
- return r;
-
poolctx.start(1);
messenger->start();
monc->set_want_keys(CEPH_ENTITY_TYPE_MON|CEPH_ENTITY_TYPE_OSD|CEPH_ENTITY_TYPE_MDS);
monc->set_messenger(messenger);
monc->init();
- r = monc->authenticate();
+ int r = monc->authenticate();
if (r < 0) {
derr << "Authentication failed, did you specify an MDS ID with a valid keyring?" << dendl;
monc->shutdown();