Project

General

Profile

Actions

Bug #19053

closed

Proxy continues to write to deleted file after log rotation

Added by Jason Nance about 7 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
Smart proxy
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

After logrotate runs both foreman-proxy and squid continue to write to the rotated log, which is a deleted file handle.

$ sudo lsof /var/log | grep deleted
squid      1357          root    5u   REG  253,6     18393 2117707 /var/log/squid/cache.log-20170327 (deleted)
squid      1359         squid    5u   REG  253,6     18393 2117707 /var/log/squid/cache.log-20170327 (deleted)
ruby       1792 foreman-proxy    7w   REG  253,6     21154 1048669 /var/log/foreman-proxy/proxy.log-20170325 (deleted)

This happens both on the Katello host and any Capsules.

I have tried manually running /bin/systemctl kill --signal=SIGUSR1 foreman-proxy >/dev/null 2>&1 || true (which is the postrotate script) but the file is not released and new file is not written to.

CentOS 7.3
Katello 3.2.2
Foreman 1.13.4
Squid 3.5.20
Logrotate 3.8.6

The only modification to /etc/logrotate.conf from the RPM-provided file is that compress has been uncommented.


Related issues 2 (1 open1 closed)

Copied to SELinux - Bug #19223: AVC denied from logrotate sending signal to foreman-proxy unitNeeds design04/07/2017Actions
Copied to foreman-tasks - Bug #19224: smart_proxy_dynflow_core.log not reopened during logrotateClosedAdam Ruzicka04/07/2017Actions
Actions

Also available in: Atom PDF