]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/auth: Improve set_expires debug output
authorTobias Urdin <tobias.urdin@binero.se>
Mon, 2 May 2022 13:25:43 +0000 (13:25 +0000)
committerTobias Urdin <tobias.urdin@binero.se>
Wed, 21 Sep 2022 20:33:29 +0000 (20:33 +0000)
Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
src/rgw/rgw_auth_keystone.cc

index c42b0604cebb3bf6ede45d173214b7731658b667..38b1c990ca8c4e2b73b2a6b2eb51a9f66b1f5edb 100644 (file)
@@ -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);
       }