Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
When logrotate happens, OS is deleting the files but actually those are present in the list of open files and marked as deleted untill the process is being killed or the respective service is being restarted.
Version-Release number of selected component (if applicable):
Satellite 6.X
How reproducible:
Always
Steps to Reproduce:
1. Wait for the logrotate to happen on foreman-proxy logs.
2. Check by command 'lsof | grep deleted | grep "\/var\/log"' and you will be able to see list of files marked as deleted eating up space(even if it's very less).
3. Restart the service i.e. foreman-proxy in this case and re-execute the command on Step 2 and now the files will have vanished as expected.
Actual results:
When a log file is being deleted by logrotate, It leaves the file descriptor open.
Expected results:
When a log file is being deleted by logrotate, It should not leave a file descriptor open and list it in the list of open files.
Additional info:
NA
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.
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