Flush Expired Openstack Keystone Tokens

After a while of running Openstack and performing a lot of testing (especially Tempest) you may find that your database seems to get pretty full … and this is partly down to expired keystone token’s that remain in the DB table.

To resolve this simply setup a periodic Cron job to execute

1
# /usr/bin/keystone-manage token_flush

This will remove all expired tokens to help clean-up the DB a bit

Of course, this action better to insert as cron task:

1
2
3
4
# cat keystone_token_flush
#!/bin/bash

10 * * * * root /usr/bin/keystone-manage token_flush
Scroll to top