COMMAND("osd setmaxosd " \
"name=newmax,type=CephInt,range=0", \
"set new maximum osd value", "osd", "rw", "cli,rest")
+COMMAND("osd set-full-ratio " \
+ "name=ratio,type=CephFloat,range=0.0|1.0", \
+ "set usage ratio at which OSDs are marked full",
+ "osd", "rw", "cli,rest")
+COMMAND("osd set-nearfull-ratio " \
+ "name=ratio,type=CephFloat,range=0.0|1.0", \
+ "set usage ratio at which OSDs are marked near-full",
+ "osd", "rw", "cli,rest")
COMMAND("osd pause", "pause osd", "osd", "rw", "cli,rest")
COMMAND("osd unpause", "unpause osd", "osd", "rw", "cli,rest")
COMMAND("osd erasure-code-profile set " \
get_last_committed() + 1));
return true;
+ } else if (prefix == "osd set-full-ratio" ||
+ prefix == "osd set-nearfull-ratio") {
+ if (!osdmap.test_flag(CEPH_OSDMAP_REQUIRE_LUMINOUS)) {
+ ss << "you must complete the upgrade and set require_luminous_osds before"
+ << " using the new interface";
+ err = -EPERM;
+ goto reply;
+ }
+ double n;
+ if (!cmd_getval(g_ceph_context, cmdmap, "ratio", n)) {
+ ss << "unable to parse 'ratio' value '"
+ << cmd_vartype_stringify(cmdmap["who"]) << "'";
+ err = -EINVAL;
+ goto reply;
+ }
+ if (prefix == "osd set-full-ratio")
+ pending_inc.new_full_ratio = n;
+ else if (prefix == "osd set-nearfull-ratio")
+ pending_inc.new_nearfull_ratio = n;
+ ss << prefix << " " << n;
+ getline(ss, rs);
+ wait_for_finished_proposal(op, new Monitor::C_Command(mon, op, 0, rs,
+ get_last_committed() + 1));
+ return true;
} else if (prefix == "osd pause") {
return prepare_set_flag(op, CEPH_OSDMAP_PAUSERD | CEPH_OSDMAP_PAUSEWR);