]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/cephfs: don't bind to public_addr 34942/head
authorYan, Zheng <zyan@redhat.com>
Thu, 7 May 2020 08:44:14 +0000 (16:44 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 25 May 2020 08:17:03 +0000 (16:17 +0800)
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>
src/ceph_syn.cc
src/tools/cephfs/MDSUtility.cc

index 165ea42308ac6db2e7faf97a63e382654c8803ab..f67f5d5b34ca292d2b2e6f8bd4adaa7b7cd0d705 100644 (file)
@@ -65,7 +65,6 @@ int main(int argc, const char **argv, char *envp[])
   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);
index cc4de9ff1b8b2586efbc38b48f7cf45beb0ea58e..13247a8ec549d722ddcd1e4f65b9ce604b1634df 100644 (file)
@@ -48,10 +48,6 @@ MDSUtility::~MDSUtility()
 int MDSUtility::init()
 {
   // Initialize Messenger
-  int r = messenger->bind(g_conf()->public_addr);
-  if (r < 0)
-    return r;
-
   poolctx.start(1);
   messenger->start();
 
@@ -73,7 +69,7 @@ int MDSUtility::init()
   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();