]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mon/MonClient: do not assert on auth in build_authorizer() 13685/head
authorKefu Chai <kchai@redhat.com>
Tue, 28 Feb 2017 06:38:14 +0000 (06:38 +0000)
committerKefu Chai <kchai@redhat.com>
Wed, 1 Mar 2017 02:11:12 +0000 (10:11 +0800)
commit27d4dcdf2d2fbff5bdb2c6e4964d54005bbf2b64
tree62c87d68b31d6024b5d58530c30e8e811104f5a9
parent4d1989dc229a7f0a5f83ff1faf9d766c20ab73a8
mon/MonClient: do not assert on auth in build_authorizer()

* there is chance that some connections is still trying to authorize
  itself after the MonClient is shut down. do not assert in this case,
  but it is a sign of bug, or bad shutdown sequence, so print a message to
  dout().
* do not use active_con->get_auth() as an alternative to `this->auth` if
  it is not available. because we promote the authorized conn in
  pending_cons as the active_con, and std::swap(active_conn->auth, this->auth)
  with the monc_lock. so there is no point to return active_con->get_auth(),
  as it's always null.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/MonClient.cc