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.83~72^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1997%2Fhead;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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 46e47cb223d..b855a30d391 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -5698,8 +5698,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";