libceph: clear messenger auth_retry flag if we fault
authorIlya Dryomov <idryomov@gmail.com>
Wed, 13 Jan 2016 13:32:57 +0000 (14:32 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 21 Jan 2016 18:36:08 +0000 (19:36 +0100)
commitf6330cc1f04b7dcb84b572d402cdacf7e275a022
treec6460bb777e8be11bf521ff5624fb4159b06c512
parent67645d7619738e51c668ca69f097cb90b5470422
libceph: clear messenger auth_retry flag if we fault

Commit 20e55c4cc758 ("libceph: clear messenger auth_retry flag when we
authenticate") got us only half way there.  We clear the flag if the
second attempt succeeds, but it also needs to be cleared if that
attempt fails, to allow for the exponential backoff to kick in.
Otherwise, if ->should_authenticate() thinks our keys are valid, we
will busy loop, incrementing auth_retry to no avail:

    process_connect ffff880079a63830 got BADAUTHORIZER attempt 1
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 2
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 3
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 4
    process_connect ffff880079a63830 got BADAUTHORIZER attempt 5
    ...

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
net/ceph/messenger.c
This page took 0.050642 seconds and 5 git commands to generate.