msg/async: do not connect from server

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>
This commit is contained in:
Sage Weil 2019-01-25 15:21:45 -06:00
parent 98a9a5e538
commit 985ec03cf9

View 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();