Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1903501

Summary: containers-tmpwatch cron job removes /var/log/containers/swift
Product: Red Hat OpenStack Reporter: Takashi Kajinami <tkajinam>
Component: openstack-tripleo-heat-templatesAssignee: Takashi Kajinami <tkajinam>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: low Docs Contact:
Priority: medium    
Version: 13.0 (Queens)CC: ahyder, cjeanner, mburns
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-8.4.1-78.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-18 13:09:23 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:

Description Takashi Kajinami 2020-12-02 08:06:31 UTC
Description of problem:

The containers-tmpwatch cron job executes tmpwatch command to purge some old files under /var/log/containers.
However this currently includes symlink in files it processes, and purge /var/log/containers/swift symlink[1] a while after initial deployment.

[1] https://github.com/openstack/tripleo-heat-templates/blob/407991def9fa04cd6650e24deb1cdd267d6860ac/docker/services/swift-proxy.yaml#L251-L255


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

How reproducible:
Always

Steps to Reproduce:
1. Deploy overcloud with LogrotatePurgeAfterDays:1
2. Wait for one day

Actual results:
/var/log/containers/swift is deleted

Expected results:
/var/log/containers/swift is not deleted


Additional info:

Comment 1 Takashi Kajinami 2020-12-02 15:05:59 UTC
I mentioned this in the lp bug report and my previous patch to master, but I noticed that we do not expect the same issue since Rocky because we no longer use symlink but actual directory for /var/log/containers/swift[1]

[1] https://review.opendev.org/c/openstack/tripleo-heat-templates/+/574221

So we need to fix this only in Queens (Pike has the same issue but it's no longer maintained)

Comment 2 David Rosenfeld 2020-12-02 18:00:46 UTC
Leaving with DF since previous containers-tmpwatch BZs were fixed by DF.

Comment 3 Cédric Jeanneret 2020-12-16 16:12:30 UTC
Giving it to you Takashi, since you already have the needed changes - Thanks!

Comment 17 errata-xmlrpc 2021-03-18 13:09:23 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 (Red Hat OpenStack Platform 13.0 bug fix and enhancement 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-2021:0932