From: John Spray Date: Mon, 16 Mar 2015 00:18:30 +0000 (+0000) Subject: mds: emit DAMAGED on MDSTable load error X-Git-Tag: v9.0.0~113^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=658d9917eb6cfb5cd87ff8b261c8fc4076a2b53d;p=ceph.git mds: emit DAMAGED on MDSTable load error Signed-off-by: John Spray --- diff --git a/src/mds/MDSTable.cc b/src/mds/MDSTable.cc index a1712dcd9edf..5471ab53fc41 100644 --- a/src/mds/MDSTable.cc +++ b/src/mds/MDSTable.cc @@ -22,6 +22,7 @@ #include "include/types.h" #include "common/config.h" +#include "common/errno.h" #include "common/Finisher.h" #include "include/assert.h" @@ -158,12 +159,15 @@ void MDSTable::load_2(int r, bufferlist& bl, Context *onfinish) assert(is_opening()); state = STATE_ACTIVE; if (r == -EBLACKLISTED) { - mds->suicide(); + mds->respawn(); return; } if (r < 0) { derr << "load_2 could not read table: " << r << dendl; - assert(r >= 0); + mds->clog->error() << "error reading table object '" << get_object_name() + << "' " << r << " (" << cpp_strerror(r) << ")"; + mds->damaged(); + assert(r >= 0); // Should be unreachable because damaged() calls respawn() } dout(10) << "load_2 got " << bl.length() << " bytes" << dendl;