Skip to content

Commit

Permalink
mgr: Mark session connections down on shutdown
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
badone committed May 24, 2017
1 parent 26df056 commit eb5c02d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/mgr/MgrClient.cc
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/osd/OSD.cc
Expand Up @@ -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;

Expand Down

0 comments on commit eb5c02d

Please sign in to comment.