Bug 1903501 - containers-tmpwatch cron job removes /var/log/containers/swift
Summary: containers-tmpwatch cron job removes /var/log/containers/swift
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Takashi Kajinami
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-02 08:06 UTC by Takashi Kajinami
Modified: 2024-03-25 17:20 UTC (History)
3 users (show)

Fixed In Version: openstack-tripleo-heat-templates-8.4.1-78.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-18 13:09:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1906489 0 None None None 2020-12-02 09:01:40 UTC
OpenStack gerrit 765151 0 None MERGED [Queens-only] Do not remove symlinks by containers-tmpwatch 2021-02-08 16:38:44 UTC
Red Hat Product Errata RHBA-2021:0932 0 None None None 2021-03-18 13:10:34 UTC

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


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