Bug 1041880

Summary: [RFE][keystone]: Periodically flush the expired tokens
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, nkinder, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/keystone/+spec/keystone-manage-token-flush-periodically
Whiteboard: upstream_milestone_none upstream_status_needs-code-review upstream_definition_obsolete
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 12:45:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description RHOS Integration 2013-12-12 19:51:40 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/keystone/+spec/keystone-manage-token-flush-periodically.

Description:

With the H release, keystone-manage  has a new parameter called "token_flush" to flush the expired tokens (see https://blueprints.launchpad.net/keystone/+spec/keystone-manage-token-flush).
This is still a manual task which needs to be done by operations. 

There should be a periodic task in keystone to flush the expired tokens automatically.

I propose to add a new config parameter to the [token] section called "flush_period". This value is an integer (in seconds). If 0, the automatic flushing is disabled. So a possible keystone.conf looks like:

[token]
...
flush_period=3600
...

With this configuration, the expired tokens are every hour deleted.
To implement this, a ThreadGroup.add_timer() from openstack.common can be used.

Specification URL (additional information):

None

Comment 2 Nathan Kinder 2014-08-06 12:45:04 UTC
Havana/RHOS4 and later already sets up the token_flush operation as a cron job.  Closing this as CURRENTRELEASE.