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 1646745 - Ansible processes might get killed when logrotate runs for smart_proxy_dynflow_core
Summary: Ansible processes might get killed when logrotate runs for smart_proxy_dynflo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.4.1
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: 1628145
TreeView+ depends on / blocked
 
Reported: 2018-11-05 22:51 UTC by Mike McCune
Modified: 2022-03-13 15:58 UTC (History)
10 users (show)

Fixed In Version: tfm-rubygem-smart_proxy_dynflow_core-0.2.1-4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1628505
Environment:
Last Closed: 2018-12-06 22:32:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24927 0 None None None 2018-11-05 22:51:13 UTC
Red Hat Product Errata RHBA-2018:3799 0 None None None 2018-12-06 22:33:26 UTC

Comment 1 Lukas Pramuk 2018-11-27 00:30:41 UTC
FailedQA.

@satellite-6.4.1-1.el7sat.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.2.1-2.el7sat.noarch

# logrotate -f /etc/logrotate.conf -v
...
rotating pattern: /var/log/foreman-proxy/smart_proxy_dynflow_core.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/foreman-proxy/smart_proxy_dynflow_core.log
  log needs rotating
rotating log /var/log/foreman-proxy/smart_proxy_dynflow_core.log, log->rotateCount is 5
dateext suffix '-20181126'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
fscreate context set to system_u:object_r:var_log_t:s0
renaming /var/log/foreman-proxy/smart_proxy_dynflow_core.log to /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20181126
creating new /var/log/foreman-proxy/smart_proxy_dynflow_core.log mode = 0644 uid = 991 gid = 988
running postrotate script
error: error running shared postrotate script for '/var/log/foreman-proxy/smart_proxy_dynflow_core.log '
...

>>> pkill command is too wide as it is killing also parent (logrotate controlled) proccess

issue failed for 6.4.0 persists, did we miss pkg version bump in compose ? 
https://bugzilla.redhat.com/show_bug.cgi?id=1628505#c16

while for 6.5.0 is fixed
https://bugzilla.redhat.com/show_bug.cgi?id=1628505#c22

Comment 2 Lukas Pramuk 2018-12-02 22:19:29 UTC
VERIFIED.

@satellite-6.4.1-1.el7sat.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.2.1-4.el7sat.noarch

using the following manual reproducer:

0) Remove offending file preventing to logrotate relevant logs
# rm -rf /var/log/foreman-proxy/smart_proxy_dynflow_core.log-`date +%Y%m%d`.gz

1) Schedule Ansible Command "sleep 1000" against a host and watch ps tree
# watch "ps -efH | grep ^foreman+"

2) Run logrotate
# logrotate -f /etc/logrotate.conf -v
...

rotating pattern: /var/log/foreman-proxy/smart_proxy_dynflow_core.log  forced from command line (5 rotations)
empty log files are not rotated, old logs are removed
considering log /var/log/foreman-proxy/smart_proxy_dynflow_core.log
  log needs rotating
rotating log /var/log/foreman-proxy/smart_proxy_dynflow_core.log, log->rotateCount is 5
dateext suffix '-20181202'
glob pattern '-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]'
glob finding old rotated logs failed
fscreate context set to system_u:object_r:var_log_t:s0
renaming /var/log/foreman-proxy/smart_proxy_dynflow_core.log to /var/log/foreman-proxy/smart_proxy_dynflow_core.log-20181202
creating new /var/log/foreman-proxy/smart_proxy_dynflow_core.log mode = 0644 uid = 991 gid = 988
running postrotate script
compressing log with: /bin/gzip
set default create context to system_u:object_r:var_log_t:s0
...

>>> relevant log rotated successfully (no errors)

3) after logrotate ps tree jobs still present REX job succeded after 1000 secs:

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************

ok: [host1.example.com]

TASK [shell] *******************************************************************

changed: [host1.example.com]

TASK [debug] *******************************************************************

ok: [host1.example.com] => {
    "out": {
        "changed": true, 
        "cmd": "sleep 1000", 
        "delta": "0:16:40.006465", 
        "end": "2018-12-02 17:12:54.224481", 
        "failed": false, 
        "rc": 0, 
        "start": "2018-12-02 16:56:14.218016", 
        "stderr": "", 
        "stderr_lines": [], 
        "stdout": "", 
        "stdout_lines": []
    }
}

PLAY RECAP *********************************************************************
host1.example.com : ok=3    changed=1    unreachable=0    failed=0   


Exit status: 0

Comment 4 errata-xmlrpc 2018-12-06 22:32:53 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-2018:3799


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