]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: OSDMonitor: be scary about inconsistent pool tier ids
authorJoao Eduardo Luis <joao.luis@inktank.com>
Wed, 2 Jul 2014 19:19:19 +0000 (20:19 +0100)
committerSage Weil <sage@redhat.com>
Fri, 1 Aug 2014 23:46:26 +0000 (16:46 -0700)
We may not crash your cluster, but you'll know that this is not something
that should have happened.  Big letters makes it obvious.  We'd make them
red too if we bothered to look for the ANSI code.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit 8e5a8daf98052954f3880d2d3516841b5062466b)

src/mon/OSDMonitor.cc

index 3c414c16f28da1a9be108eccf0ac5a3e94e3847e..93b5f7372ddd04577629135bf993362df08c32dc 100644 (file)
@@ -5080,7 +5080,10 @@ done:
       goto reply;
     }
     if (tp->tier_of != pool_id) {
-      ss << "tier pool '" << tierpoolstr << "' is a tier of '" << tp->tier_of << "'";
+      ss << "tier pool '" << tierpoolstr << "' is a tier of '"
+         << osdmap.get_pool_name(tp->tier_of) << "': "
+         // be scary about it; this is an inconsistency and bells must go off
+         << "THIS SHOULD NOT HAVE HAPPENED AT ALL";
       err = -EINVAL;
       goto reply;
     }