OPTION(mon_osd_max_split_count, OPT_INT, 32) // largest number of PGs per "involved" OSD to let split create
OPTION(mon_osd_allow_primary_temp, OPT_BOOL, false) // allow primary_temp to be set in the osdmap
OPTION(mon_osd_allow_primary_affinity, OPT_BOOL, false) // allow primary_affinity to be set in the osdmap
-OPTION(mon_osd_allow_pg_upmap, OPT_BOOL, false) // allow pg upmap to be set in the osdmap
OPTION(mon_osd_prime_pg_temp, OPT_BOOL, true) // prime osdmap with pg mapping changes
OPTION(mon_osd_prime_pg_temp_max_time, OPT_FLOAT, .5) // max time to spend priming
OPTION(mon_osd_prime_pg_temp_max_estimate, OPT_FLOAT, .25) // max estimate of pg total before we do all pgs in parallel
ss << "set " << pgid << " primary_temp mapping to " << osd;
goto update;
} else if (prefix == "osd pg-upmap") {
- if (!g_conf->mon_osd_allow_pg_upmap) {
- ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster.";
+ if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
+ ss << "you must set the require_luminous_osds flag to use this feature";
err = -EPERM;
goto reply;
}
- if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
- ss << "you must set the require_luminous_osds flag to use this feature";
+ if (osdmap.require_min_compat_client < "luminous") {
+ ss << "min_compat_client " << osdmap.require_min_compat_client
+ << " < luminous, which is required for pg-upmap";
err = -EPERM;
goto reply;
}
ss << "set " << pgid << " pg_upmap mapping to " << new_pg_upmap;
goto update;
} else if (prefix == "osd rm-pg-upmap") {
- if (!g_conf->mon_osd_allow_pg_upmap) {
- ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster.";
+ if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
+ ss << "you must set the require_luminous_osds flag to use this feature";
err = -EPERM;
goto reply;
}
- if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
- ss << "you must set the require_luminous_osds flag to use this feature";
+ if (osdmap.require_min_compat_client < "luminous") {
+ ss << "require_min_compat_client " << osdmap.require_min_compat_client
+ << " < luminous, which is required for pg-upmap";
err = -EPERM;
goto reply;
}
ss << "clear " << pgid << " pg_upmap mapping";
goto update;
} else if (prefix == "osd pg-upmap-items") {
- if (!g_conf->mon_osd_allow_pg_upmap) {
- ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster.";
+ if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
+ ss << "you must set the require_luminous_osds flag to use this feature";
err = -EPERM;
goto reply;
}
- if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
- ss << "you must set the require_luminous_osds flag to use this feature";
+ if (osdmap.require_min_compat_client < "luminous") {
+ ss << "require_min_compat_client " << osdmap.require_min_compat_client
+ << " < luminous, which is required for pg-upmap";
err = -EPERM;
goto reply;
}
ss << "set " << pgid << " pg_upmap_items mapping to " << new_pg_upmap_items;
goto update;
} else if (prefix == "osd rm-pg-upmap-items") {
- if (!g_conf->mon_osd_allow_pg_upmap) {
- ss << "you must enable 'mon osd allow pg upmap = true' on the mons before you can adjust pg_upmap. note that pre-luminous clients will no longer be able to communicate with the cluster.";
+ if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
+ ss << "you must set the require_luminous_osds flag to use this feature";
err = -EPERM;
goto reply;
}
- if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
- ss << "you must set the require_luminous_osds flag to use this feature";
+ if (osdmap.require_min_compat_client < "luminous") {
+ ss << "require_min_compat_client " << osdmap.require_min_compat_client
+ << " < luminous, which is required for pg-upmap";
err = -EPERM;
goto reply;
}