From: John Spray Date: Tue, 3 Jun 2014 09:12:41 +0000 (+0100) Subject: mon: name instead of id in "has tiers" message X-Git-Tag: v0.80.6~50 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ed0fa034aa8e49ab703bdb798bd6211a83e3a9d;p=ceph.git 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) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index ca36078d4794..6581517b8cca 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";