Bug 1402502

Summary: No log files for purge jobs on Controllers [keystone]
Product: Red Hat OpenStack Reporter: Alex Krzos <akrzos>
Component: openstack-tripleo-heat-templatesAssignee: Jiri Stransky <jstransk>
Status: CLOSED CURRENTRELEASE QA Contact: Arik Chernetsky <achernet>
Severity: medium Docs Contact:
Priority: medium    
Version: 10.0 (Newton)CC: abishop, aschultz, josorior, jtaleric, mburns, nkinder, owalsh, rhel-osp-director-maint
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1562995 1562996 (view as bug list) Environment:
Last Closed: 2018-11-01 19:57:27 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:
Bug Depends On:    
Bug Blocks: 1562995, 1562996    

Description Alex Krzos 2016-12-07 16:57:15 UTC
Description of problem:
I suspected that the token flush cron job is pegging out my disk so I looked for a log file and to my surprise we log to /dev/null.  The upstream puppet-keystone installation shows we should log to "/var/log/keystone/keystone-tokenflush.log"

[root@overcloud-controller-0 keystone]# crontab -u keystone -l
# HEADER: This file was autogenerated at 2016-12-06 15:01:50 +0000 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 0 * * * sleep `expr ${RANDOM} \% 3600`; keystone-manage token_flush >>/dev/null 2>&1
[root@overcloud-controller-0 keystone]# pwd
/var/log/keystone
[root@overcloud-controller-0 keystone]# ls -la
total 2332
drwxr-x---.  2 keystone keystone      26 Nov 30 21:02 .
drwxr-xr-x. 40 root     root        4096 Dec  6 15:23 ..
-rw-rw----.  1 root     keystone 2379437 Dec  7 16:47 keystone.log


We need to log when this job runs and if issues arise from it for accountability.


Version-Release number of selected component (if applicable):
Newton
Build 2016-11-30.9

How reproducible:
Always (configuration issue)

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:
log to keystone-token.log

Additional info:


Other cron jobs appear to log to /dev/null as well:

Heat:
1 0 * * * sleep `expr ${RANDOM} \% 3600`; heat-manage purge_deleted -g days 30 >>/dev/null 2>&1

Nova:
1 */12 * * * nova-manage db archive_deleted_rows --max_rows 100 >>/dev/null 2>&1

Cinder:
1 0 * * * cinder-manage db purge 30 >>/dev/null 2>&1

Comment 2 Alan Bishop 2018-04-05 14:54:12 UTC
I'm looking at the cinder variant of this BZ [1], and looking at at reasonably current 10z deployment. The keystone-tokenflush.log file is present, and the issue seems resolved by [2].

So this BZ might be closed CURRENTRELEASE.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1562996
[2] https://review.openstack.org/482585

Comment 3 Ollie Walsh 2018-04-05 23:04:43 UTC
Do we need log rotation?

Comment 4 Alan Bishop 2018-04-05 23:10:38 UTC
Sorry, no ideas on that. I was not involved in the original work, and commented here because of something I spotted while investigating the cinder clone of this (bug #1562996).