Skip to content

Commit

Permalink
libceph: clear messenger auth_retry flag when we authenticate
Browse files Browse the repository at this point in the history
We maintain a counter of failed auth attempts to allow us to retry once
before failing.  However, if the second attempt succeeds, the flag isn't
cleared, which makes us think auth failed again later when the connection
resets for other reasons (like a socket error).

This is one part of the sorry sequence of events in bug

	http://tracker.ceph.com/issues/4282

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
  • Loading branch information
Sage Weil committed May 2, 2013
1 parent 3a23083 commit 20e55c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/ceph/messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -2013,7 +2013,6 @@ static int process_connect(struct ceph_connection *con)
con->error_msg = "connect authorization failure";
return -1;
}
con->auth_retry = 1;
con_out_kvec_reset(con);
ret = prepare_write_connect(con);
if (ret < 0)
Expand Down Expand Up @@ -2099,7 +2098,7 @@ static int process_connect(struct ceph_connection *con)

WARN_ON(con->state != CON_STATE_NEGOTIATING);
con->state = CON_STATE_OPEN;

con->auth_retry = 0; /* we authenticated; clear flag */
con->peer_global_seq = le32_to_cpu(con->in_reply.global_seq);
con->connect_seq++;
con->peer_features = server_feat;
Expand Down

0 comments on commit 20e55c4

Please sign in to comment.