Bug 1745494 - When running remote action with ansible-runner the task ends up in suspended state
Summary: When running remote action with ansible-runner the task ends up in suspended ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Ansible
Version: 6.6.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: 6.7.0
Assignee: Adam Ruzicka
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-26 08:54 UTC by Kenny Tordeurs
Modified: 2020-04-14 13:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:25:28 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 27834 Normal Closed When running remote action with ansible-runner the task ends up in suspended state 2020-10-12 12:10:55 UTC
Red Hat Product Errata RHSA-2020:1454 None None None 2020-04-14 13:25:45 UTC

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@redhat.com

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

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


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