]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: name instead of id in "has tiers" message
authorJohn Spray <jspray@redhat.com>
Tue, 3 Jun 2014 09:12:41 +0000 (10:12 +0100)
committerSage Weil <sage@redhat.com>
Sat, 16 Aug 2014 04:30:53 +0000 (21:30 -0700)
Instead of "Pool foo has tiers 1 2" print
"Pool foo has tiers bar baz".

Signed-off-by: John Spray <jspray@redhat.com>
(cherry picked from commit 97772c2f53f726bd71710d0d3e34159d2679390a)

src/mon/OSDMonitor.cc

index ca36078d4794aff954d71a554278724c874d2b05..6581517b8ccaeb3626d1f89c83b9c73011f73608 100644 (file)
@@ -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<uint64_t>::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";