From ce8390116ebe67f3ce3718909266711dd7f90521 Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Tue, 15 Jan 2019 13:49:40 +0800 Subject: [PATCH] msg/async: do not force updating rotating keys inline Signed-off-by: xie xingguo --- src/msg/async/AsyncConnection.cc | 11 ++--------- src/msg/async/AsyncConnection.h | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index 572ced03e944e..afce192036125 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -129,7 +129,7 @@ AsyncConnection::AsyncConnection(CephContext *cct, AsyncMessenger *m, DispatchQu recv_start(0), recv_end(0), last_active(ceph::coarse_mono_clock::now()), inactive_timeout_us(cct->_conf->ms_tcp_read_timeout*1000*1000), - got_bad_auth(false), authorizer(NULL), replacing(false), + authorizer(NULL), replacing(false), is_reset_from_peer(false), once_ready(false), state_buffer(NULL), state_offset(0), worker(w), center(&w->center) { @@ -879,7 +879,6 @@ ssize_t AsyncConnection::_process_connection() assert(!policy.server); // reset connect state variables - got_bad_auth = false; delete authorizer; authorizer = NULL; authorizer_buf.clear(); @@ -1423,12 +1422,7 @@ int AsyncConnection::handle_connect_reply(ceph_msg_connect &connect, ceph_msg_co if (reply.tag == CEPH_MSGR_TAG_BADAUTHORIZER) { ldout(async_msgr->cct,0) << __func__ << " connect got BADAUTHORIZER" << dendl; - if (got_bad_auth) - goto fail; - got_bad_auth = true; - delete authorizer; - authorizer = async_msgr->get_authorizer(peer_type, true); // try harder - state = STATE_CONNECTING_SEND_CONNECT_MSG; + goto fail; } if (reply.tag == CEPH_MSGR_TAG_RESETSESSION) { ldout(async_msgr->cct, 0) << __func__ << " connect got RESETSESSION" << dendl; @@ -2346,7 +2340,6 @@ void AsyncConnection::reset_recv_state() state <= STATE_CONNECTING_READY) { delete authorizer; authorizer = NULL; - got_bad_auth = false; } if (state > STATE_OPEN_MESSAGE_THROTTLE_MESSAGE && diff --git a/src/msg/async/AsyncConnection.h b/src/msg/async/AsyncConnection.h index 64a7502403bb1..06a23ab01d648 100644 --- a/src/msg/async/AsyncConnection.h +++ b/src/msg/async/AsyncConnection.h @@ -348,7 +348,6 @@ class AsyncConnection : public Connection { bufferlist front, middle, data; ceph_msg_connect connect_msg; // Connecting state - bool got_bad_auth; AuthAuthorizer *authorizer; bufferlist authorizer_buf; ceph_msg_connect_reply connect_reply; -- 2.39.5