]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: do not connect from server
authorSage Weil <sage@redhat.com>
Fri, 25 Jan 2019 21:21:45 +0000 (15:21 -0600)
committerSage Weil <sage@redhat.com>
Sat, 26 Jan 2019 17:44:55 +0000 (11:44 -0600)
We could have a fault on a server-side of a non-lossy connectoin where
there is a fault and we have outgoing data queued.  Since we are a server,
we cannot connect; we should just go into standby and wait for the other
end to reconnect, or for someone to mark us down.

This fixes a failure reproduced by Messenger/MessengerTest.SyntheticInjectTest/0
where it would assert(!policy.server) in the connect code.

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/async/ProtocolV2.cc

index d6e9f1257381e1d87e4c78a62dc7e4efecce6dcd..b25132fb3d2e44cc0e06d206e208afbadfc28d3f 100644 (file)
@@ -661,6 +661,12 @@ CtPtr ProtocolV2::_fault() {
     connection->write_lock.unlock();
     return nullptr;
   }
+  if (connection->policy.server) {
+    ldout(cct, 1) << __func__ << " server, going to standby, even though i have stuff queued" << dendl;
+    state = STANDBY;
+    connection->write_lock.unlock();
+    return nullptr;
+  }
 
   connection->write_lock.unlock();