The features are now stored in the protocol implementation. When we replace
an existing connection, copy those features so that our connect_msg_reply
calculates the correct features for the session.
This fixes an issue where a 3-mon cluster, after upgrading the two followers
but not the leader, was unable to include the (luminous) leader in the
quorum because it was seeing missing features in the connect reply, because
the new mons were replacing an old instance of the connection and weren't
copying the features, and that old instance had connect_msg.features == 0.
Add some debug lines that helped (finally) identify the problem.
Signed-off-by: Sage Weil <sage@redhat.com>
Having these live in teuthology.git is silly, since they are only consumed
by the ceph task, and it is hard to revise the behavior.
Revise the behavior by adding mon_bind_* options.
Signed-off-by: Sage Weil <sage@redhat.com>
This ensures the mons can use default ports, ceph.conf won't have v1: or
v2: prefixes, and old clients will be happy.
Signed-off-by: Sage Weil <sage@redhat.com>
Client addresses are untyped in that they can connect to v1 or v2 server
endpoints, so blacklist them as TYPE_ANY.
Signed-off-by: Sage Weil <sage@redhat.com>
We can't make an addr -> addrvec transition without a compat encoding,
unfortunately (I screwed this one up back when then ADDR2 feature was
introduced).
Signed-off-by: Sage Weil <sage@redhat.com>
- Use the addrvecs in the monmap, and bind accordingly
- If we are joining the cluster, generate sane addrvec for ourselves
- Adjsut warning about mismatched ceph.conf. Note that this may become
noisy for old clusters, mostly because the conf-based mon addr options
are ancient and crufty and should not be used.
Signed-off-by: Sage Weil <sage@redhat.com>
If we are given a mon addr (a raw IP or hostname) we don't know whether
it is a legacy or msgr2 entity_addr_t. Either infer from the port number
or probe both protocol types.
Signed-off-by: Sage Weil <sage@redhat.com>
If a port is not specified (or the legacy port is specified), add both
the new IANA and legacy addrs to the map.
Signed-off-by: Sage Weil <sage@redhat.com>
Modify MonMap to store an addrvec instead of just an addr.
Add temporary helper/wrapper methods to avoid changing all of the callers
(yet).
No big semantic changes yet!
Signed-off-by: Sage Weil <sage@redhat.com>
We may bind to v1 and v2 addrs, but we need to behave if the mon only
recognized our v1 addr and still go active. That's because whether they
see our v2 addr depends on whether we connected to the mon via the v1 or
v2 port, and the mon may not be binding to v2 (yet, or ever).
Add a legacy_equals to entity_addrvec_t, and use that instead of
probably_equals for the OSD boot checks. The probably_equals returns true
if the IP address portion of the address is empty.. which should never
happen in the OSD boot case since we have learned our real IP long before
we try to send osd_boot.
Signed-off-by: Sage Weil <sage@redhat.com>