From: Sage Weil Date: Fri, 7 Mar 2014 21:24:04 +0000 (-0800) Subject: mon/OSDMonitor: prevent set primary-affinity unless all OSDs support it X-Git-Tag: v0.78~65^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b9bcc1590c6f28af36a7f859b47b80c2d709a3b5;p=ceph.git mon/OSDMonitor: prevent set primary-affinity unless all OSDs support it Make sure all running OSDs support the feature before we start using it (even if the config option is on!). Fixes: #7642 Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 72ee04d2145d5..6dc4bed05c429 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -4060,6 +4060,9 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *m, err = -EPERM; goto reply; } + err = check_cluster_features(CEPH_FEATURE_OSD_PRIMARY_AFFINITY, ss); + if (err < 0) + goto reply; if (osdmap.exists(id)) { pending_inc.new_primary_affinity[id] = ww; ss << "set osd." << id << " primary-affinity to " << w << " (" << ios::hex << ww << ios::dec << ")";