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.
DescriptionRudnei Bertol Jr.
2020-05-19 19:49:51 UTC
Description of problem:
Ansible temporary files are not removed from the /tmp directory when running ansible job roles via remote execution on Satellite 6.7.
Version-Release number of selected component (if applicable):
Satellite 6.6+
How reproducible:
Run the Ansible Job template on the Satellite 6.6 against the Satellite Clients.
Steps to Reproduce:
1. Hosts > Job Template > Ansible Roles - Ansible Default > Run
2. Select some hosts via Search Query
3. Submit
Actual results:
The temporary ansible-files are not removed from the TMP directory, in some cases where the remote execution is used many times the file system that the /tmp is mounted is growing up.
Expected results:
This file would be removed after the task finishes.
Additional info:
### From Satellite 6.6
~~~
[root@sat66b ~]# ls -lht /tmp |grep foreman-proxy | head
drwxr-xr-x. 2 foreman-proxy foreman-proxy 24K May 19 13:54 foreman-inventories
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-a395c352-43ce-4c99-83c9-2aaffefffddf.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-bae7e93b-ab43-4ca5-850b-5e38abce697c.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-4c24f7da-3efd-4481-8917-08d0e7793964.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-ccde61f5-3395-4392-871c-40889a6a03be.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-65a7c49d-7ab3-4877-be5d-21240a31df25.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-41f59b9b-2fb2-4c22-8daa-86edccbb3bbf.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-76f64005-a025-4f1b-938a-f1cf65b3dcf5.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-3585cf90-d073-428a-a54a-cba244cf9918.yml
-rw-r--r--. 1 foreman-proxy foreman-proxy 150 May 19 13:54 foreman-playbook-eba18bf5-b674-4f4c-b90d-b36f38cab0cb.yml
[root@sat66b ~]# ls -lht /tmp |grep foreman-proxy | wc -l
~~~
### From Satellite 6.7
~~~
[root@sat67a ~]# ls -lht /tmp | grep foreman-proxy
drwx------. 5 foreman-proxy foreman-proxy 67 May 19 13:45 d20200519-20798-bo32v
drwx------. 5 foreman-proxy foreman-proxy 67 May 19 13:45 d20200519-20798-8m3wmo
drwx------. 5 foreman-proxy foreman-proxy 67 May 19 13:44 d20200519-20798-1g197z0
~~~
Oops.
The fix is not present, rel-eng failure:
# grep -A3 'def close' /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_ansible_core-*/lib/foreman_ansible_core/runner/ansible_runner.rb
<empty>
I miss these lines being added:
---
def close
super
FileUtils.remove_entry(@root) if @tmp_working_dir
end
---
Comment 13Rudnei Bertol Jr.
2021-01-11 15:51:51 UTC
Hey Guys,
Thank you for working hard on this BZ, we appreciate it.
Working on further case issues, we had the necessity to use those files to troubleshoot some ansible-runner/execution issues.
Is there a possibility to add an option on the Satellite settings to keep those files? Like an option to debug those files if we need it.
regards
rbertol
VERIFIED.
@Satellite 6.9.0 Snap13
tfm-rubygem-foreman_ansible_core-4.0.0-1.el7sat.noarch
by the following reproducer:
1) Monitor /tmp directory for foreman-proxy content:
# watch "ls -lt /tmp | grep foreman-proxy"
2) Run ansible REX command "sleep 60" against a host while monitoring /tmp directory
Before run:
<empty>
During run:
drwx------. 3 foreman-proxy foreman-proxy 29 Feb 15 07:26 ansible-local-285640GtC4z
drwx------. 5 foreman-proxy foreman-proxy 67 Feb 15 07:26 d20210215-10703-1uz4wsf
After run:
<empty>
>>> temporary working dirs are deleted after the job finished
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 (Moderate: Satellite 6.9 Release), 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-2021:1313