mon: OSDMonitor: be scary about inconsistent pool tier ids

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>
This commit is contained in:
Joao Eduardo Luis 2014-07-02 20:19:19 +01:00
parent 64bdf6c92b
commit 8e5a8daf98

View File

@ -5235,7 +5235,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;
}