From f8e4af2ddbb8140b5fe1bd3008dff4ea645e452d Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 22 Jan 2014 18:08:23 -0800 Subject: [PATCH] OSDMonitor: do not allow creation of EC pools if the quorum can't handle it Signed-off-by: Greg Farnum --- src/mon/OSDMonitor.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7d30e174168b..520f508c1532 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3965,12 +3965,16 @@ done: pool_type = pg_pool_t::TYPE_REPLICATED; } else if (pool_type_str == "erasure") { - // check if all up osds support erasure coding - set up_osds; - osdmap.get_up_osds(up_osds); + // make sure all the daemons support erasure coding stringstream ec_unsupported_ss; int ec_unsupported_count = 0; + if (!(mon->get_quorum_features() & CEPH_FEATURE_OSD_ERASURE_CODES)) { + ec_unsupported_ss << "the monitor cluster"; + ++ec_unsupported_count; + } + set up_osds; + osdmap.get_up_osds(up_osds); for (set::iterator it = up_osds.begin(); it != up_osds.end(); it ++) { const osd_xinfo_t &xi = osdmap.get_xinfo(*it); -- 2.47.3