summaryrefslogtreecommitdiff
path: root/net/ceph/osd_client.c
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-03-25 21:26:01 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-20 23:01:32 +0400
commitd2c7223497cf8228416c70e3f4238ddd6c5bdf3c (patch)
treeef28b3569210839a399698f34605da9dd7202632 /net/ceph/osd_client.c
parentdef71c018b0cc6c1eb7f30aa3268e764f48e9cf0 (diff)
downloadlinux-d2c7223497cf8228416c70e3f4238ddd6c5bdf3c.tar.xz
libceph: add update_authorizer auth method
commit 0bed9b5c523d577378b6f83eab5835fe30c27208 upstream. Currently the messenger calls out to a get_authorizer con op, which will create a new authorizer if it doesn't yet have one. In the meantime, when we rotate our service keys, the authorizer doesn't get updated. Eventually it will be rejected by the server on a new connection attempt and get invalidated, and we will then rebuild a new authorizer, but this is not ideal. Instead, if we do have an authorizer, call a new update_authorizer op that will verify that the current authorizer is using the latest secret. If it is not, we will build a new one that does. This avoids the transient failure. This fixes one of the sorry sequence of events for bug http://tracker.ceph.com/issues/4282 Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Alex Elder <elder@inktank.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ceph/osd_client.c')
-rw-r--r--net/ceph/osd_client.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c
index ff0fc4e847cb..60ac2c9b7af8 100644
--- a/net/ceph/osd_client.c
+++ b/net/ceph/osd_client.c
@@ -2177,6 +2177,11 @@ static struct ceph_auth_handshake *get_authorizer(struct ceph_connection *con,
auth);
if (ret)
return ERR_PTR(ret);
+ } else if (ac->ops && ac->ops->update_authorizer) {
+ int ret = ac->ops->update_authorizer(ac, CEPH_ENTITY_TYPE_OSD,
+ auth);
+ if (ret)
+ return ERR_PTR(ret);
}
*proto = ac->protocol;