From 2ed0fa034aa8e49ab703bdb798bd6211a83e3a9d Mon Sep 17 00:00:00 2001 From: John Spray Date: Tue, 3 Jun 2014 10:12:41 +0100 Subject: [PATCH] mon: name instead of id in "has tiers" message Instead of "Pool foo has tiers 1 2" print "Pool foo has tiers bar baz". Signed-off-by: John Spray (cherry picked from commit 97772c2f53f726bd71710d0d3e34159d2679390a) --- src/mon/OSDMonitor.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index ca36078d4794a..6581517b8ccae 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -5821,8 +5821,12 @@ int OSDMonitor::_check_remove_pool(int64_t pool, const pg_pool_t *p, return -EBUSY; } if (!p->tiers.empty()) { - *ss << "pool '" << poolstr << "' includes tiers " - << p->tiers; + *ss << "pool '" << poolstr << "' has tiers"; + for(std::set::iterator i = p->tiers.begin(); i != p->tiers.end(); ++i) { + const char *name = osdmap.get_pool_name(*i); + assert(name != NULL); + *ss << " " << name; + } return -EBUSY; } *ss << "pool '" << poolstr << "' removed"; -- 2.39.5