logrotate_crond removes files and sends too many SIGHUPs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Bogdan Dobrelya |
Bug Description
So currently the logrotate_crond container has a few issues issues:
A) In the postrotate it matches pids multiple times and sends SIGHUPs multiple time to processes:
======== /var/log/messages =====
Jun 3 09:01:15 overcloud-
Jun 3 09:01:15 overcloud-
Jun 3 09:01:15 overcloud-
Jun 3 09:01:15 overcloud-
Jun 3 09:01:15 overcloud-
Jun 3 09:01:15 overcloud-
...
B) The logrotate_crond container should not rotate logs for services running on the host outside of containers (i.e. rsyslog has its own /etc/logrotate.
C) The find command matches older files to be deleted but the SIGHUP is never sent so we actually can end up in a situation where we remove a file but the new one never gets created because the service does not get a SIGHUP signal:
ls -la /var/log/
-rw-r--r--. 1 root root 52046652 May 29 14:10 /var/log/
-rw-r--r--. 1 root root 0 May 24 19:14 /var/log/
-rw-r--r--. 1 root root 5894 May 24 19:14 /var/log/
-rw-r--r--. 1 root root 50755274 May 29 14:10 /var/log/
-rw-r--r--. 1 root root 4138 May 25 11:58 /var/log/
-rw-r--r--. 1 root root 5894 May 24 19:13 /var/log/
Changed in tripleo: | |
milestone: | rocky-rc1 → stein-1 |
Fix proposed to branch: master /review. openstack. org/574835
Review: https:/