From: Greg Farnum Date: Thu, 23 Jan 2014 02:08:23 +0000 (-0800) Subject: OSDMonitor: do not allow creation of EC pools if the quorum can't handle it X-Git-Tag: v0.78~251^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8e4af2ddbb8140b5fe1bd3008dff4ea645e452d;p=ceph.git OSDMonitor: do not allow creation of EC pools if the quorum can't handle it Signed-off-by: Greg Farnum --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 7d30e174168..520f508c153 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);