From deb92c9d89cf5c9f52f32ee0b16861aa7f6169c6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 13 Dec 2018 09:14:03 -0600 Subject: [PATCH] mon/OSDMonitor: require mimic mons for require_osd_release=mimic Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 51cbf07e7b9..810feb3dbfc 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -10194,6 +10194,12 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, goto reply; } if (rel == CEPH_RELEASE_MIMIC) { + if (!mon->monmap->get_required_features().contains_all( + ceph::features::mon::FEATURE_MIMIC)) { + ss << "not all mons are mimic"; + err = -EPERM; + goto reply; + } if ((!HAVE_FEATURE(osdmap.get_up_osd_features(), SERVER_MIMIC)) && !sure) { ss << "not all up OSDs have CEPH_FEATURE_SERVER_MIMIC feature";