Bug 1745494

Summary: When running remote action with ansible-runner the task ends up in suspended state
Product: Red Hat Satellite Reporter: Kenny Tordeurs <ktordeur>
Component: Ansible - Configuration ManagementAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: aruzicka, mmccune, pcreech, risantam
Target Milestone: 6.7.0Keywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-04-14 13:25:28 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:

Description Kenny Tordeurs 2019-08-26 08:54:44 UTC
Description of problem:
Actions::RemoteExecution::RunHostJob to install katello-host-tools-tracer package via ansible-runner method for 2 hosts (via Ansible commands), the task ends up in suspended state.

~~~
3: Actions::ProxyAction (suspended) [ 0.01s / 0.01s ]  
~~~
Version-Release number of selected component (if applicable):
satellite-6.6.0-5.beta.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. https://access.redhat.com/documentation/en-us/red_hat_satellite/6.6-beta/html-single/managing_hosts/index#sect-Configuring_Ansible_Runner
2. Try to install a package on some hosts via Ansible 
3. 

Actual results:
Task ends up in suspended state

Expected results:
Task to finish

Additional info:
Changing it back to the ansible-playbook method works without issues.

Comment 14 Adam Ruzicka 2019-09-11 13:58:33 UTC
Created redmine issue https://projects.theforeman.org/issues/27834 from this bug

Comment 15 Bryan Kearney 2019-09-12 12:02:49 UTC
Upstream bug assigned to aruzicka

Comment 16 Bryan Kearney 2019-09-12 12:02:51 UTC
Upstream bug assigned to aruzicka

Comment 17 Bryan Kearney 2019-09-30 12:02:55 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27834 has been resolved.

Comment 18 Lukas Pramuk 2020-03-08 20:42:48 UTC
VERIFIED.

@Satellite 6.7.0 Snap14
tfm-rubygem-foreman_ansible_core-3.0.2-1.el7sat.noarch

using the reproducer described in comment#0:

1) Register a host and set it up for REX

2) Assign Satellite Tools repo to the host

3) Schedule REX Ansible Command "yum -y install katello-host-tools-tracer" (or any other package that is available)

Job Output
--------------------
   1:
   2:PLAY [all] *********************************************************************
   3:
   4:TASK [Gathering Facts] *********************************************************
   5:ok: [host.example.com]
   6:
   7:TASK [shell] *******************************************************************
   8:[WARNING]: Consider using the yum module rather than running 'yum'.  If you
   9:need to use command because yum is insufficient you can add 'warn: false' to
  10:this command task or set 'command_warnings=False' in ansible.cfg to get rid of
  11:this message.
  12:changed: [host.example.com]
  13:
  14:TASK [debug] *******************************************************************
  15:ok: [host.example.com] => {
  16:    "out": {
...

 147:PLAY RECAP *********************************************************************
 148:host.example.com : ok=3    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
 149:Exit status: 0
--------------------

Task Detail
-----------
 Label: Actions::RemoteExecution::RunHostJob
Status: stopped
Result: success 
-----------

>>> the task even though contains WARNING about yum module finishes successfully (vs. running forever/suspended) and no longer defunct ansible-runner process remains running on Satellite

Comment 21 errata-xmlrpc 2020-04-14 13:25:28 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/RHSA-2020:1454