containers-tmpwatch cron job removes /var/log/containers/swift

Bug #1906489 reported by Takashi Kajinami on 2020-12-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Low
Takashi Kajinami

Bug Description

Description
===========
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

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

Expected result
===============
/var/log/containers/swift is NOT deleted

Actual result
=============
/var/log/containers/swift is deleted

Environment
===========
The issue was initially observed in Queens.
Since Rocky a directory, instead of a symlink, is used for /var/log/containers so Rocky and later released are not affected.

https://review.opendev.org/c/765068

Logs & Configs
==============
N/A

Revision history for this message
Takashi Kajinami (kajinamit) wrote :
Changed in tripleo:
assignee: nobody → Takashi Kajinami (kajinamit)
status: New → In Progress
importance: Undecided → Low
Revision history for this message
Takashi Kajinami (kajinamit) wrote :

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 the problem is reproduced only in Queens deployment.

description: updated
Changed in tripleo:
milestone: none → wallaby-2
Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Changed in tripleo:
milestone: wallaby-3 → wallaby-rc1
Changed in tripleo:
milestone: wallaby-rc1 → xena-1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers