]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr: Mark session connections down on shutdown 15192/head
authorBrad Hubbard <bhubbard@redhat.com>
Wed, 17 May 2017 03:28:26 +0000 (13:28 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Wed, 24 May 2017 04:11:32 +0000 (14:11 +1000)
Also assert in OSD::ms_get_authorizer since it is dangerous to proceed
if we are shutting down.

Fixes: http://tracker.ceph.com/issues/19900
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
src/mgr/MgrClient.cc
src/osd/OSD.cc

index 2f558c0614adb2edbf13fdf66651016f6cc78afe..45d2707af25d2c46de21a9380dc1e3080a0f9f8b 100644 (file)
@@ -59,7 +59,10 @@ void MgrClient::shutdown()
   command_table.clear();
 
   timer.shutdown();
-  session.reset();
+  if (session) {
+    session->con->mark_down();
+    session.reset();
+  }
 }
 
 bool MgrClient::ms_dispatch(Message *m)
index 4397b8dad0fb3b15be31024f09cbd9bd4a285e16..b227bff0f4329ff3d952a2329fa49b606ee52cff 100644 (file)
@@ -6655,6 +6655,9 @@ bool OSD::ms_get_authorizer(int dest_type, AuthAuthorizer **authorizer, bool for
 {
   dout(10) << "OSD::ms_get_authorizer type=" << ceph_entity_type_name(dest_type) << dendl;
 
+  if (is_stopping())
+    dout(10) << __func__ << " bailing, we are shutting down" << dendl;
+
   if (dest_type == CEPH_ENTITY_TYPE_MON)
     return true;