]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: restart on -EBLACKLISTED 2340/head
authorJohn Spray <john.spray@redhat.com>
Wed, 27 Aug 2014 21:32:12 +0000 (22:32 +0100)
committerJohn Spray <john.spray@redhat.com>
Wed, 27 Aug 2014 21:37:17 +0000 (22:37 +0100)
Previously these cases would (hopefully) hit an
assert(r==0) in the various completion contexts,
and the MDS would "crash" from the user's point of view.

With the introduction of MDSIOContext, we have a single
place to filter all RADOS op responses, which also has
a handle to the global MDS instance.  Check result values
for -EBLACKLISTED and call MDS::respawn() in response.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/MDSContext.cc

index 4894aec092d013b33a374a02e2c1a8c744473222..47143f260d1664ce44f258d65eb510a1b678857a 100644 (file)
@@ -42,7 +42,12 @@ void MDSIOContextBase::complete(int r) {
   dout(10) << "MDSIOContextBase::complete: " << typeid(*this).name() << dendl;
   assert(mds != NULL);
   Mutex::Locker l(mds->mds_lock);
-  MDSContext::complete(r);
+  if (r == -EBLACKLISTED) {
+    derr << "MDSIOContextBase: blacklisted!  Restarting..." << dendl;
+    mds->respawn();
+  } else {
+    MDSContext::complete(r);
+  }
 }
 
 MDS *MDSIOContext::get_mds() {