mon: add NVMEOF_BEACON_DIFF to mon_feature_t and mon CompatSet
NOPE NOPE
In order for the client to safely send BEACON_DIFF messages, it
needs to be the case that the leader at the time of receipt will
support BEACON_DIFF.
Simply using the connection features for the MonClient's target mon is
insufficient, because it might be a peon. If the peon supports
BEACON_DIFF and the leader does not the leader will either crash or
interpret it as a full BEACON. Neither outcome is acceptable.
Instead, we need to wire up a feature bit to the MonMap mon_feature_t
members and the CompatSet.
Adding FEATURE_BEACON_DIFF to ceph::features::mon get_supported()
and get_persistent() ensures that once all monitors in the quorum
support it, MonMap::get_required_features() will include it.
See Elector::propose_to_peers, Monitor::(win|lose)_election,
MonmapMonitor::apply_mon_features.
Once FEATURE_BEACON_DIFF is present in MonMap::get_required_features():
- Monitor::apply_monmap_to_compatset_features() will prevent
downgrades of the monitors by updating the CompatSet to include
CEPH_MON_FEATURE_INCOMPAT_NVMEOF_BEACON_DIFF
- Monitor::calc_quorum_requirements() will set
Monitor::required_features to require the NVMEOF_BEACON_DIFF
for any monitor peers.
- MonClient::get_monmap_required_features() will eventually include
ceph::features::mon::FEATURE_NVMEOF_BEACON_DIFF.