From 16d3a524d8420fafae91e1da351b5c4d703e9d35 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Apr 2017 09:21:17 -0400 Subject: [PATCH] mon/OSDMonitor: require_luminous_osds for pg-remap[-items] Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 93b4414ea602c..58ae2fca10fe9 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7429,6 +7429,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, 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"; + err = -EPERM; + goto reply; + } err = check_cluster_features(CEPH_FEATUREMASK_OSDMAP_REMAP, ss); if (err == -EAGAIN) goto wait; @@ -7484,6 +7489,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, 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"; + err = -EPERM; + goto reply; + } err = check_cluster_features(CEPH_FEATUREMASK_OSDMAP_REMAP, ss); if (err == -EAGAIN) goto wait; @@ -7523,6 +7533,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, 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"; + err = -EPERM; + goto reply; + } err = check_cluster_features(CEPH_FEATUREMASK_OSDMAP_REMAP, ss); if (err == -EAGAIN) goto wait; @@ -7590,6 +7605,11 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, 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"; + err = -EPERM; + goto reply; + } err = check_cluster_features(CEPH_FEATUREMASK_OSDMAP_REMAP, ss); if (err == -EAGAIN) goto wait; -- 2.39.5