]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
msg/async: very protocol type when looking up existing connections
authorSage Weil <sage@redhat.com>
Tue, 5 Feb 2019 11:08:00 +0000 (05:08 -0600)
committerSage Weil <sage@redhat.com>
Thu, 7 Feb 2019 12:13:09 +0000 (06:13 -0600)
commitcb0e7e0281ad7754669ea17a7c52efcd56393b21
treecca7d463ff09ddd50939ff9248b5ff325019c4fb
parent3518f794a2379d0d469b1d28591c44b71954c941
msg/async: very protocol type when looking up existing connections

Since we register client connections as any:, we may have either a ProtocolV1 or V2
connection.  This happens when clients have an imprecise mon search list and connect
to the same mon via both v1 and v2, for example when you do something like

 ceph -m 'v2:127.0.0.1:40648/0,v1:127.0.0.1:40649/0' -s

If we do encounter the other protocol type than what we expect, just mark it down and
proceed.  This is only a temporarily case that happens during mon discovery, the client
is always prepared to retry, and it doesn't actually matter which one succeeds since
it will return a monmap and the client will adapt accordingly.

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