From 5c3d0740514e55f8340c721c0d19bdcec0cac561 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 1 Jul 2015 18:20:02 +0800 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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) << "'";