Bug 1564519 - Incorrect setting in Cinder's db purge cron job
Summary: Incorrect setting in Cinder's db purge cron job
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z2
: 13.0 (Queens)
Assignee: Alan Bishop
QA Contact: Avi Avraham
URL:
Whiteboard:
Depends On:
Blocks: 1589951
TreeView+ depends on / blocked
 
Reported: 2018-04-06 13:40 UTC by Alan Bishop
Modified: 2018-12-24 11:40 UTC (History)
5 users (show)

Fixed In Version: openstack-tripleo-heat-templates-8.0.3-2.el7ost
Doc Type: Bug Fix
Doc Text:
The default age for purging deleted database records has been corrected so that deleted records are purged from Cinder's database. Previously, the CinderCronDbPurgeAge value for Cinder's purge cron job used the wrong value and deleted records were not purged from Cinder's DB when they reached the required default age.
Clone Of:
: 1589951 (view as bug list)
Environment:
Last Closed: 2018-08-29 16:35:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1761749 0 None None None 2018-04-06 13:40:36 UTC
OpenStack gerrit 560154 0 None stable/queens: MERGED tripleo-heat-templates: Fix Cinder's default db purge cron settings (I00e1b257067bb4bff955f65ca8256092470a5cdc) 2018-07-19 14:52:34 UTC
Red Hat Product Errata RHBA-2018:2574 0 None None None 2018-08-29 16:36:16 UTC

Description Alan Bishop 2018-04-06 13:40:36 UTC
Description of problem:
The default value for Cinder's db purge cron job is incorrect. The THT parameter is defaulting the db purge job's "age in days" to 0, when instead it should match the default value in puppet-cinder, which is 30.

Version-Release number of selected component (if applicable):


How reproducible: 
Always

Steps to Reproduce:
1. Deploy overcloud with default CinderCronDbPurgeAge
2.
3.

Actual results:

Display cinder's cron job on controller:

[root@overcloud-controller-0 logrotate.d]# crontab -u cinder -l                                                                                                            
# HEADER: This file was autogenerated at 2018-04-05 21:04:24 +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: cinder-manage db purge
PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh
1 0 * * * cinder-manage db purge 0 >>/var/log/cinder/cinder-rowsflush.log 2>&1

The "0" after "db purge" is the age setting that is incorrect.

Expected results:

The age should default to 30.

Additional info:

Comment 1 Alan Bishop 2018-06-11 16:22:04 UTC
Retargeting for OSP-13 since 11 is EOL.

Comment 2 Alan Bishop 2018-06-11 17:27:50 UTC
Upstream patch should arrive via next RDO import (for 13z1).

Comment 13 Tzach Shefi 2018-08-14 07:02:57 UTC
Verified on:
openstack-tripleo-heat-templates-8.0.4-4.el7ost.noarch

# docker exec -it openstack-cinder-volume-docker-0 /bin/bash
()[root@controller-0 /]# crontab -u cinder -l
# HEADER: This file was autogenerated at 2018-08-01 13:27:31 +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: cinder-manage db purge
PATH=/bin:/usr/bin:/usr/sbin SHELL=/bin/sh
1 0 * * * cinder-manage db purge 30 >>/var/log/cinder/cinder-rowsflush.log 2>&1

As expected -> cinder-manage db purge 30

Comment 15 errata-xmlrpc 2018-08-29 16:35:26 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-2018:2574


Note You need to log in before you can comment on or make changes to this bug.