mirror of
https://github.com/ceph/ceph
synced 2025-01-19 17:41:39 +00:00
mon/OSDMonitor: guard 'osd crush set-device-class'
Requires luminous. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
8b5640d093
commit
b0335e05ba
@ -7060,6 +7060,12 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op,
|
||||
goto update;
|
||||
|
||||
} else if (prefix == "osd crush set-device-class") {
|
||||
if (osdmap.require_osd_release < CEPH_RELEASE_LUMINOUS) {
|
||||
ss << "you must complete the upgrade and set require_osd_release ="
|
||||
<< "luminous before using crush device classes";
|
||||
err = -EPERM;
|
||||
goto reply;
|
||||
}
|
||||
if (!osdmap.exists(osdid)) {
|
||||
err = -ENOENT;
|
||||
ss << name << " does not exist. create it before updating the crush map";
|
||||
|
Loading…
Reference in New Issue
Block a user