Skip to content

Commit

Permalink
libceph: fix authorizer invalidation
Browse files Browse the repository at this point in the history
We were invalidating the authorizer by removing the ticket handler
entirely.  This was effective in inducing us to request a new authorizer,
but in the meantime it mean that any authorizer we generated would get a
new and initialized handler with secret_id=0, which would always be
rejected by the server side with a confusing error message:

 auth: could not find secret_id=0
 cephx: verify_authorizer could not get service secret for service osd secret_id=0

Instead, simply clear the validity field.  This will still induce the auth
code to request a new secret, but will let us continue to use the old
ticket in the meantime.  The messenger code will probably continue to fail,
but the exponential backoff will kick in, and eventually the we will get a
new (hopefully more valid) ticket from the mon and be able to continue.

Signed-off-by: Sage Weil <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
  • Loading branch information
Sage Weil committed May 2, 2013
1 parent 20e55c4 commit 4b8e8b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ceph/auth_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ static void ceph_x_invalidate_authorizer(struct ceph_auth_client *ac,

th = get_ticket_handler(ac, peer_type);
if (!IS_ERR(th))
remove_ticket_handler(ac, th);
memset(&th->validity, 0, sizeof(th->validity));
}


Expand Down

0 comments on commit 4b8e8b5

Please sign in to comment.