From a8b23e4ea5c1ccfa82f2b9664bbbab9d897b201c Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Mon, 2 May 2022 13:25:43 +0000 Subject: [PATCH] rgw/auth: Improve set_expires debug output Signed-off-by: Tobias Urdin --- src/rgw/rgw_auth_keystone.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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); } -- 2.47.3