]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async/Protocol*: unregister con from accept vs mark_down race
authorSage Weil <sage@redhat.com>
Wed, 2 Jan 2019 19:04:14 +0000 (13:04 -0600)
committerSage Weil <sage@redhat.com>
Fri, 4 Jan 2019 19:43:58 +0000 (13:43 -0600)
If we are accepting a connection and it gets marked down while we are
working on it, unregister it. Otherwise, we leave teh connection CLOSED
and registered and it interferes with the ability to open a new connection.

Fixes: http://tracker.ceph.com/issues/37778
Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV1.cc
src/msg/async/ProtocolV2.cc

index ab4b526105f1ca5d82a285adc34e2e28e747d8c4..0c2627b33782a438d38c2b548b7d8609dde0a08a 100644 (file)
@@ -2387,6 +2387,7 @@ CtPtr ProtocolV1::open(ceph_msg_connect_reply &reply,
                   << dendl;
     ceph_assert(state == CLOSED || state == NONE);
     ldout(cct, 10) << "accept fault after register" << dendl;
+    messenger->unregister_conn(connection);
     connection->inject_delay();
     return _fault();
   }
index 99b424e6dbc3c1aea9a0d4704b64d8aa695966e3..bfa08fc4038a2b7e2933cba9e1a35e35eda357a4 100644 (file)
@@ -2426,6 +2426,7 @@ CtPtr ProtocolV2::open(ceph_msg_connect_reply &reply,
                   << dendl;
     ceph_assert(state == CLOSED || state == NONE);
     ldout(cct, 10) << "accept fault after register" << dendl;
+    messenger->unregister_conn(connection);
     connection->inject_delay();
     return _fault();
   }