DEFINE_CEPH_FEATURE(49, 2, SERVER_SQUID);
DEFINE_CEPH_FEATURE_RETIRED(50, 1, MON_METADATA, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE(50, 2, SERVER_TENTACLE);
-DEFINE_CEPH_FEATURE_RETIRED(51, 1, OSD_BITWISE_HOBJ_SORT, MIMIC, OCTOPUS)
DEFINE_CEPH_FEATURE(51, 2, NVMEOF_BEACON_DIFF)
// available
DEFINE_CEPH_FEATURE_RETIRED(52, 1, OSD_PROXY_WRITE_FEATURES, MIMIC, OCTOPUS)
uint64_t sequence_ = 0, // default sequence for backward compatibility
bool enable_diff = false) // default to legacy behavior for backward compatibility
: PaxosServiceMessage{MSG_MNVMEOF_GW_BEACON,
- static_cast<version_t>(enable_diff ? 1 : 0), // user_version: 1=enhanced, 0=legacy
+ 0,
enable_diff ? BEACON_VERSION_ENHANCED :
BEACON_VERSION_LEGACY, BEACON_VERSION_LEGACY},// Minimum compatible version
gw_id(gw_id_), gw_pool(gw_pool_), gw_group(gw_group_), subsystems(subsystems_),
}
int NVMeofGwMap::cfg_add_gw(
- const NvmeGwId &gw_id, const NvmeGroupKey& group_key, bool test)
+ const NvmeGwId &gw_id, const NvmeGroupKey& group_key, uint64_t features)
{
std::set<NvmeAnaGrpId> allocated;
- if (test || HAVE_FEATURE(mon->get_quorum_con_features(), NVMEOFHAMAP)) {
+ if (HAVE_FEATURE(features, NVMEOFHAMAP)) {
auto gw_epoch_it = gw_epoch.find(group_key);
if (gw_epoch_it == gw_epoch.end()) {
gw_epoch[group_key] = epoch;
}
int NVMeofGwMap::cfg_delete_gw(
- const NvmeGwId &gw_id, const NvmeGroupKey& group_key, bool test)
+ const NvmeGwId &gw_id, const NvmeGroupKey& group_key)
{
- if (test)
- return do_delete_gw(gw_id, group_key);
-
if (HAVE_FEATURE(mon->get_quorum_con_features(), NVMEOFHA)) {
dout(10) << " has NVMEOFHA: 1" << dendl;
for (auto& gws_states: created_gws[group_key]) {
void check_all_gws_in_deleting_state(const NvmeGwId &gw_id,
const NvmeGroupKey& group_key);
int cfg_add_gw(const NvmeGwId &gw_id, const NvmeGroupKey& group_key,
- bool test = false);
- int cfg_delete_gw(const NvmeGwId &gw_id, const NvmeGroupKey& group_key,
- bool test = false);
+ uint64_t features);
+ int cfg_delete_gw(const NvmeGwId &gw_id, const NvmeGroupKey& group_key);
void process_gw_map_ka(
const NvmeGwId &gw_id, const NvmeGroupKey& group_key,
epoch_t& last_osd_epoch, bool &propose_pending);
int process_gw_map_gw_down(
- const NvmeGwId &gw_id, const Nv/meGroupKey& group_key,
+ const NvmeGwId &gw_id, const NvmeGroupKey& group_key,
bool &propose_pending);
int process_gw_map_gw_no_subsys_no_listeners(
const NvmeGwId &gw_id, const NvmeGroupKey& group_key,
auto group_key = std::make_pair(pool, group);
dout(10) << " id "<< id <<" pool "<< pool << " group "<< group << dendl;
if (prefix == "nvme-gw create") {
- rc = pending_map.cfg_add_gw(id, group_key);
+ rc = pending_map.cfg_add_gw(id, group_key,
+ mon.get_quorum_con_features());
if (rc == -EINVAL) {
err = rc;
dout (4) << "Error: GW cannot be created " << id
decode(state.gw_map_epoch, bl);
decode(state.subsystems, bl);
uint32_t avail;
- uint64_t last_beacon_seq_number;
decode(avail, bl);
state.availability = (gw_availability_t)avail;
if (struct_v >= 2) {
- decode(last_beacon_seq_number, bl);
- state.last_beacon_seq_number = last_beacon_seq_number;
+ decode(state.last_beacon_seq_number, bl);
decode(state.last_beacon_seq_ooo, bl);
}
DECODE_FINISH(bl);
BeaconSubsystem sub = { nqn, {}, {}, subsystem_change_t::SUBSYSTEM_CHANGED };
BeaconSubsystems subs = {sub};
- pending_map.cfg_add_gw("GW1" ,group_key, true);
- pending_map.cfg_add_gw("GW2" ,group_key, true);
- pending_map.cfg_add_gw("GW3" ,group_key, true);
+ pending_map.cfg_add_gw("GW1" ,group_key, CEPH_FEATURES_ALL);
+ pending_map.cfg_add_gw("GW2" ,group_key, CEPH_FEATURES_ALL);
+ pending_map.cfg_add_gw("GW3" ,group_key, CEPH_FEATURES_ALL);
NvmeNonceVector new_nonces = {"abc", "def","hij"};
pending_map.created_gws[group_key]["GW1"].nonce_map[1] = new_nonces;
pending_map.created_gws[group_key]["GW1"].performed_full_startup = true;
int epoch = msg1->get_gwmap_epoch();
dout(0) << "after decode empty msg: " << *msg1 << " epoch " << epoch << dendl;
- pending_map.cfg_add_gw("GW1" ,group_key, true);
- pending_map.cfg_add_gw("GW2" ,group_key, true);
- pending_map.cfg_add_gw("GW3" ,group_key, true);
+ pending_map.cfg_add_gw("GW1" ,group_key, CEPH_FEATURES_ALL);
+ pending_map.cfg_add_gw("GW2" ,group_key, CEPH_FEATURES_ALL);
+ pending_map.cfg_add_gw("GW3" ,group_key, CEPH_FEATURES_ALL);
NvmeNonceVector new_nonces = {"abc", "def","hij"};
pending_map.created_gws[group_key]["GW1"].nonce_map[1] = new_nonces;
pending_map.created_gws[group_key]["GW1"].subsystems.push_back(sub);