From: Tobias Urdin Date: Mon, 2 May 2022 13:25:43 +0000 (+0000) Subject: rgw/auth: Improve set_expires debug output X-Git-Tag: v18.1.0~1023^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a8b23e4ea5c1ccfa82f2b9664bbbab9d897b201c;p=ceph.git rgw/auth: Improve set_expires debug output Signed-off-by: Tobias Urdin --- diff --git a/src/rgw/rgw_auth_keystone.cc b/src/rgw/rgw_auth_keystone.cc index c42b0604cebb..38b1c990ca8c 100644 --- a/src/rgw/rgw_auth_keystone.cc +++ b/src/rgw/rgw_auth_keystone.cc @@ -335,9 +335,12 @@ TokenEngine::authenticate(const DoutPrefixProvider* dpp, /* If this token was an allowed expired token because we got a * service token we need to update the expiration before we cache it. */ if (allow_expired) { - uint64_t new_expires = ceph_clock_now().sec() + g_conf()->rgw_keystone_expired_token_cache_expiration; + uint64_t now = ceph_clock_now().sec(); + uint64_t new_expires = now + g_conf()->rgw_keystone_expired_token_cache_expiration; ldpp_dout(dpp, 20) << "updating expiration of allowed expired token" - << " from " << t->get_expires() << " to " + << " from old " << t->get_expires() << " to now " << now << " + " + << g_conf()->rgw_keystone_expired_token_cache_expiration + << " secs = " << new_expires << dendl; t->set_expires(new_expires); }