Bug 1750030
Summary: | Deleted log files kept open until the respective service is restarted | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Satellite | Reporter: | Sayan Das <saydas> | ||||||
Component: | Foreman Proxy | Assignee: | Lukas Zapletal <lzap> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Lukas Pramuk <lpramuk> | ||||||
Severity: | high | Docs Contact: | |||||||
Priority: | high | ||||||||
Version: | 6.5.0 | CC: | aruzicka, bkearney, inecas, kagarwal, ktordeur, lzap, mmccune, pcreech, pdwyer, sthirugn, vsedmik, wclark | ||||||
Target Milestone: | 6.7.0 | Keywords: | Regression, Triaged | ||||||
Target Release: | Unused | ||||||||
Hardware: | All | ||||||||
OS: | Linux | ||||||||
Whiteboard: | hotfix_delivered | ||||||||
Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | |||||||||
: | 1769906 (view as bug list) | Environment: | |||||||
Last Closed: | 2020-04-14 13:25:37 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: | |||||||||
Attachments: |
|
Description
Sayan Das
2019-09-07 14:52:13 UTC
I have a suspicion that this is actually SELinux bug, let's see what customer reports back: https://projects.theforeman.org/issues/19053 Created attachment 1630091 [details]
Patch for Satellite 6.5 foreman-proxy daemon
Created attachment 1630713 [details]
hotfix RPM
Hotfix is delivered for Satellite 6.5. Installation instructions:
1. Take a backup of affected Satellites and/or Capsules
2. Download hotfix RPM from this BZ and send it to affected Satellites and/or Capsules
3. yum localinstall /path/to/hotfix/rpm
4. restart services
Hello, I can confirm that those patches fixes an issue that is related to this problem. When foreman-proxy received a signal, it was supposed to reopen logging file /var/log/foreman-proxy/proxy.log but due to bug it was not doing this at all. I have tested the upstream change, chances are that the original patch was incorrect, or backport has some other issue. However keep in mind that you must test this with SELinux disabled or in permissive mode because there is another BZ we track related to logrotate - SELinux prevents logrotated from sending a signal to foreman-proxy. Workaround until this is resolved - set logging level to WARNING in proxy.yml to avoid excessive amount of data in proxy.log. VERIFIED.
@satellite-6.7.0-4.beta.el7sat.noarch
foreman-proxy-1.24.0-0.4.RC2.el7sat.noarch
by the following manual reproducer:
1) Check that foreman-proxy is running
# ps -efH | grep foreman\\-proxy
foreman+ 18267 1 0 Nov26 ? 00:00:07 ruby /usr/share/foreman-proxy/bin/smart-proxy --no-daemonize
foreman+ 18556 1 0 Nov26 ? 00:00:13 ruby /usr/bin/smart_proxy_dynflow_core -d -p /var/run/foreman-proxy/smart_proxy_dynflow_core.pid
2) Check that there are already logrotated files (as Satellite is running for couple of days)
# ll /var/log/foreman-proxy/proxy*.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 222 Nov 25 23:51 /var/log/foreman-proxy/proxy.log-20191126.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy 2532 Nov 26 23:51 /var/log/foreman-proxy/proxy.log-20191127.gz
3) Check for presence of logrotated (deleted) log files being kept open
# lsof | grep '/var/log.* (deleted)'
<empty>
>>> the foreman-proxy log files are logrotated properly without keeping deleted files open
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, 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/RHSA-2020:1454 |