Bug 1470226

Summary: Token flush does not complete when expired tokens becomes large enough
Product: Red Hat OpenStack Reporter: Harry Rybacki <hrybacki>
Component: openstack-puppet-modulesAssignee: Harry Rybacki <hrybacki>
Status: CLOSED ERRATA QA Contact: Prasanth Anbalagan <panbalag>
Severity: high Docs Contact:
Priority: urgent    
Version: 10.0 (Newton)CC: akrzos, aschultz, ccollett, cshastri, dhill, ggillies, hrybacki, jdennis, jjoyce, josorior, jschluet, kbasil, lmiccini, mlopes, nchandek, nkinder, panbalag, rcritten, slinaber, srevivo, tvignaud, vcojot
Target Milestone: zstreamKeywords: Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-puppet-modules-7.1.5-6.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1404324 Environment:
Last Closed: 2017-09-12 17:16:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1404324, 1470227, 1470230, 1473713    
Bug Blocks: 1451122, 1467120, 1469457, 1470221    

Comment 3 Prasanth Anbalagan 2017-08-30 18:10:46 UTC
Verified as follows - Tokens get flushed as expected.
[root@rhos-compute-node-02 ~]# yum list installed | grep openstack-puppet
openstack-puppet-modules.noarch  1:7.1.5-6.el7ost        @rhelosp-8.0-puddle    

[root@rhos-compute-node-02 ~]# sudo crontab -u keystone -l
# HEADER: This file was autogenerated at 2017-08-30 11:24:44 -0400 by puppet.
# HEADER: While it can still be managed manually, it is definitely not recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
# Puppet Name: keystone-manage token_flush
PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh
*/1 * * * * keystone-manage token_flush >>/dev/null 2>&1


Database changed
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     1235 |
+----------+
1 row in set (0.00 sec)

MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     1236 |
+----------+
1 row in set (0.00 sec)
..
...
....
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     9570 |
+----------+
1 row in set (0.00 sec)

MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     9412 |
+----------+
1 row in set (0.00 sec)
..
...
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     9119 |
+----------+
1 row in set (0.00 sec)
..
...
...
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     8344 |
+----------+
1 row in set (0.01 sec)
.
..

Database changed
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     8034 |
+----------+
1 row in set (0.00 sec)
..
...
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     7733 |
+----------+
1 row in set (0.00 sec)

..
...
MariaDB [keystone]> select count(*) from token;
+----------+
| count(*) |
+----------+
|     7577 |
+----------+
1 row in set (0.00 sec)

Comment 5 errata-xmlrpc 2017-09-12 17:16:11 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2691