Skip to content

Commit

Permalink
Merge pull request ceph#25859 from xiexingguo/wip-async-no-force-rene…
Browse files Browse the repository at this point in the history
…w-auth

msg/async: do not force updating rotating keys inline

Reviewed-by: Sage Weil <[email protected]>
  • Loading branch information
xiexingguo authored Jan 14, 2019
2 parents 1c845f3 + 794a8f9 commit 96a20b7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
12 changes: 1 addition & 11 deletions src/msg/async/ProtocolV1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ ProtocolV1::ProtocolV1(AsyncConnection *connection)
once_ready(false),
state(NONE),
global_seq(0),
got_bad_auth(false),
authorizer(nullptr),
wait_for_seq(false) {
temp_buffer = new char[4096];
Expand All @@ -101,7 +100,6 @@ void ProtocolV1::connect() {
this->state = START_CONNECT;

// reset connect state variables
got_bad_auth = false;
if (authorizer) {
delete authorizer;
authorizer = nullptr;
Expand Down Expand Up @@ -1241,7 +1239,6 @@ void ProtocolV1::reset_recv_state() {
delete authorizer;
}
authorizer = nullptr;
got_bad_auth = false;
}

// clean read and write callbacks
Expand Down Expand Up @@ -1568,14 +1565,7 @@ CtPtr ProtocolV1::handle_connect_reply_2() {

if (connect_reply.tag == CEPH_MSGR_TAG_BADAUTHORIZER) {
ldout(cct, 0) << __func__ << " connect got BADAUTHORIZER" << dendl;
if (got_bad_auth) {
return _fault();
}
got_bad_auth = true;
delete authorizer;
authorizer = messenger->ms_deliver_get_authorizer(connection->peer_type,
true); // try harder
return CONTINUE(send_connect_message);
return _fault();
}

if (connect_reply.tag == CEPH_MSGR_TAG_RESETSESSION) {
Expand Down
3 changes: 1 addition & 2 deletions src/msg/async/ProtocolV1.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ handle_tag_ack | v |
// Client Protocol
private:
int global_seq;
bool got_bad_auth;
AuthAuthorizer *authorizer;

CONTINUATION_DECL(ProtocolV1, send_client_banner);
Expand Down Expand Up @@ -301,4 +300,4 @@ class LoopbackProtocolV1 : public ProtocolV1 {
}
};

#endif /* _MSG_ASYNC_PROTOCOL_V1_ */
#endif /* _MSG_ASYNC_PROTOCOL_V1_ */
12 changes: 1 addition & 11 deletions src/msg/async/ProtocolV2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ ProtocolV2::ProtocolV2(AsyncConnection *connection)
once_ready(false),
state(NONE),
global_seq(0),
got_bad_auth(false),
authorizer(nullptr),
wait_for_seq(false) {
temp_buffer = new char[4096];
Expand All @@ -96,7 +95,6 @@ void ProtocolV2::connect() {
this->state = START_CONNECT;

// reset connect state variables
got_bad_auth = false;
if (authorizer) {
delete authorizer;
authorizer = nullptr;
Expand Down Expand Up @@ -1238,7 +1236,6 @@ void ProtocolV2::reset_recv_state() {
delete authorizer;
}
authorizer = nullptr;
got_bad_auth = false;
}

// clean read and write callbacks
Expand Down Expand Up @@ -1598,14 +1595,7 @@ CtPtr ProtocolV2::handle_connect_reply_2() {

if (connect_reply.tag == CEPH_MSGR_TAG_BADAUTHORIZER) {
ldout(cct, 0) << __func__ << " connect got BADAUTHORIZER" << dendl;
if (got_bad_auth) {
return _fault();
}
got_bad_auth = true;
delete authorizer;
authorizer = messenger->ms_deliver_get_authorizer(connection->peer_type,
true); // try harder
return CONTINUE(send_connect_message);
return _fault();
}

if (connect_reply.tag == CEPH_MSGR_TAG_RESETSESSION) {
Expand Down
1 change: 0 additions & 1 deletion src/msg/async/ProtocolV2.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ class ProtocolV2 : public Protocol {
// Client Protocol
private:
int global_seq;
bool got_bad_auth;
AuthAuthorizer *authorizer;

CONTINUATION_DECL(ProtocolV2, send_client_banner);
Expand Down

0 comments on commit 96a20b7

Please sign in to comment.