This is similar to what we do for OSDMonitor::create_initial().
Avoid setting these initial features just for teh mon test that verifies
persistent features get set on a full quorum.
Signed-off-by: Sage Weil <sage@redhat.com>
OPTION(mon_debug_dump_location, OPT_STR, "/var/log/ceph/$cluster-$name.tdump")
OPTION(mon_debug_no_require_luminous, OPT_BOOL, false)
OPTION(mon_debug_no_require_bluestore_for_ec_overwrites, OPT_BOOL, false)
+OPTION(mon_debug_no_initial_persistent_features, OPT_BOOL, false)
OPTION(mon_inject_transaction_delay_max, OPT_DOUBLE, 10.0) // seconds
OPTION(mon_inject_transaction_delay_probability, OPT_DOUBLE, 0) // range [0, 1]
dout(10) << "create_initial using current monmap" << dendl;
pending_map = *mon->monmap;
pending_map.epoch = 1;
+
+ if (g_conf->mon_debug_no_initial_persistent_features) {
+ derr << __func__ << " mon_debug_no_initial_persistent_features=true"
+ << dendl;
+ } else {
+ // initialize with default persistent features for new clusters
+ pending_map.persistent_features = ceph::features::mon::get_persistent();
+ }
}
void MonmapMonitor::update_from_paxos(bool *need_bootstrap)
// new cluster should require latest by default
if (g_conf->mon_debug_no_require_luminous) {
newmap.require_osd_release = CEPH_RELEASE_KRAKEN;
+ derr << __func__ << " mon_debug_no_require_luminous=true" << dendl;
} else {
newmap.require_osd_release = CEPH_RELEASE_LUMINOUS;
newmap.full_ratio = g_conf->mon_osd_full_ratio;
CEPH_ARGS="--fsid=$fsid --auth-supported=none "
CEPH_ARGS+="--mon-initial-members=a,b,c "
CEPH_ARGS+="--mon-host=$MONA,$MONB,$MONC "
+ CEPH_ARGS+="--mon-debug-no-initial-persistent-features "
+ CEPH_ARGS+="--mon-debug-no-require-luminous "
run_mon $dir a --public-addr $MONA || return 1
run_mon $dir b --public-addr $MONB || return 1