]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg/async: use v1 for v1 <-> [v2,v1] peers
authorSage Weil <sage@redhat.com>
Tue, 15 Jan 2019 16:38:29 +0000 (10:38 -0600)
committerSage Weil <sage@redhat.com>
Tue, 15 Jan 2019 16:42:29 +0000 (10:42 -0600)
commitcb5ada19702d387724f4fb93e0f7763a0d3bb0ae
tree1aefcb387c5e5ea92038579f0397816fd56f34fc
parent9459c6118abe9370955ac362c8565c1b232e4293
msg/async: use v1 for v1 <-> [v2,v1] peers

If *peers* are communicating, i.e. there may be bidirectional connection
attempts, we must use the same protocol version from both ends or else
we will get very confused.

Fix this by forcing the use of v1 when we

- are bound to a v1 endpoint only (people can't connect to us via v2)
- we are connecting to a *peer*

If it is a non-peer, then connections are uni-directional.  If we both
have v2, we will both use v2.

If we ever switch to [v2,v1], it will be as part of a restart.

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