[3.5.y.z,extended,stable] Patch "libceph: clear messenger auth_retry flag when we authenticate" has been added to staging queue

Message ID 1371200010-4695-1-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques June 14, 2013, 8:53 a.m.
This is a note to let you know that I have just added a patch titled

    libceph: clear messenger auth_retry flag when we authenticate

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:


If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see



From 71cac6258d2e0c2b199d2d1ab12907a1588f71df Mon Sep 17 00:00:00 2001
From: Sage Weil <sage@inktank.com>
Date: Mon, 25 Mar 2013 09:30:13 -0700
Subject: [PATCH] libceph: clear messenger auth_retry flag when we authenticate

commit 20e55c4cc758e4dccdfd92ae8e9588dd624b2cd7 upstream.

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


Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
 net/ceph/messenger.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)



diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 692243a..559690f 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -1548,7 +1548,6 @@  static int process_connect(struct ceph_connection *con)
 			con->error_msg = "connect authorization failure";
 			return -1;
-		con->auth_retry = 1;
 		ret = prepare_write_connect(con);
 		if (ret < 0)
@@ -1633,7 +1632,7 @@  static int process_connect(struct ceph_connection *con)

 		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->peer_features = server_feat;