From: Sage Weil Date: Fri, 7 Jul 2017 16:17:36 +0000 (-0400) Subject: mon/OSDMonitor: guard 'osd crush set-device-class' X-Git-Tag: v12.1.1~124^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b0335e05ba9a54b01e3f2fa3aa32d8034e9e2113;p=ceph-ci.git mon/OSDMonitor: guard 'osd crush set-device-class' Requires luminous. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 032a42bb7e0..921b8f88199 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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";