From: Kefu Chai Date: Wed, 1 Jul 2015 10:20:02 +0000 (+0800) Subject: mon: disallow adding a tier on top of another tier X-Git-Tag: v9.0.3~102^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F5113%2Fhead;p=ceph.git mon: disallow adding a tier on top of another tier multiple tiering is not supported at the moment Fixes: #11840 Signed-off-by: Kefu Chai --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 22ab5c6120e..84545bff402 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -7357,6 +7357,14 @@ bool OSDMonitor::_check_become_tier( return false; } + if (base_pool->is_tier()) { + *ss << "pool '" << base_pool_name << "' is already a tier of '" + << osdmap.get_pool_name(base_pool->tier_of) << "', " + << "multiple tiers are not yet supported."; + *err = -EINVAL; + return false; + } + if (tier_pool->is_tier()) { *ss << "tier pool '" << tier_pool_name << "' is already a tier of '" << osdmap.get_pool_name(tier_pool->tier_of) << "'";