Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1769894 - Rotated and deleted log files kept open until smart-proxy is restarted
Summary: Rotated and deleted log files kept open until smart-proxy is restarted
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Foreman Proxy
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: 6.6.1
Assignee: Lukas Zapletal
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-07 16:42 UTC by Mike McCune
Modified: 2023-09-07 20:57 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1750248
Environment:
Last Closed: 2019-12-04 21:12:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 27509 0 Normal Closed Smart-proxy USR1 reopen does not work 2020-06-25 18:27:03 UTC
Red Hat Product Errata RHBA-2019:4103 0 None None None 2019-12-04 21:12:20 UTC

Comment 3 Lukas Pramuk 2019-11-22 13:35:08 UTC
VERIFIED.

@satellite-6.6.1-1.el7sat.noarch
foreman-proxy-1.22.0.3-1.el7sat.noarch

by the following manual reproducer:

1) Check that foreman-proxy is running

# ps -efH | grep foreman\\-proxy
foreman+ 11631     1  0 Nov20 ?        00:00:24   ruby /usr/share/foreman-proxy/bin/smart-proxy --no-daemonize
foreman+ 11789     1  0 Nov20 ?        00:00:35   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 3972 Nov 20 23:50 /var/log/foreman-proxy/proxy.log-20191121.gz
-rw-r--r--. 1 foreman-proxy foreman-proxy  223 Nov 21 23:50 /var/log/foreman-proxy/proxy.log-20191122.gz

3) Check for presence of logrotated (deleted) log files being kept open

# lsof | grep '/var/log.* (deleted)'

REPRO:

ruby      11631       foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631       foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby-time 11631 11632 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby-time 11631 11632 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11634 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11634 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11635 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11635 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11636 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11636 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11649 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11649 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11650 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11650 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11659 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11659 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)
ruby      11631 11685 foreman-proxy    7u      REG              253,0     36912  478164178 /var/log/foreman-proxy/proxy.log-20191121 (deleted)
ruby      11631 11685 foreman-proxy   11u      REG              253,0       562  478164207 /var/log/foreman-proxy/proxy.log-20191122 (deleted)

vs. 

FIX:

<empty>

>>> the foreman-proxy log files are logrotated properly without keeping deleted files open

Comment 5 errata-xmlrpc 2019-12-04 21:12:15 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, 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-2019:4103


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