Bug 1817320 - Failed to run ansible job when disabling "foreman_tasks_proxy_batch_trigger"
Summary: Failed to run ansible job when disabling "foreman_tasks_proxy_batch_trigger"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Tasks Plugin
Version: 6.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: 6.9.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-26 06:30 UTC by Hao Chang Yu
Modified: 2023-10-06 19:30 UTC (History)
12 users (show)

Fixed In Version: tfm-rubygem-foreman_ansible-6.0.0 foreman_remote_execution 3.0.2 foreman-tasks-0.15.12
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1943266 (view as bug list)
Environment:
Last Closed: 2021-04-21 13:12:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
HOTFIX RPM for Satellite 6.8.4 (2.07 MB, application/x-rpm)
2021-03-08 21:01 UTC, wclark
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28612 0 Normal Closed Ansible runs fail when proxy batch triggering is disabled 2021-02-18 16:36:00 UTC
Foreman Issue Tracker 28613 0 Normal Closed Add support for overriding proxy action class from provider 2021-02-18 16:35:59 UTC
Foreman Issue Tracker 29415 0 Normal Ready For Testing Failed to run ansible job when disabling "foreman_tasks_proxy_batch_trigger" 2021-02-18 16:36:00 UTC

Description Hao Chang Yu 2020-03-26 06:30:11 UTC
Description of problem:
Ansible job is treated as a remote execution job when disabling "foreman_tasks_proxy_batch_trigger" which causing it to fail.

Steps to Reproduce:
1. Disable batch trigger
Web UI -> Admister -> Settings -> ForemanTasks -> foreman_tasks_proxy_batch_trigger -> Se to "No"

2. Run an ansible job.

Go to Web UI -> Monitor -> Jobs -> Run Job:

Job category: Ansible Playbook
Job template: Ansible Roles - Ansible default
Search Query: *   <=== use "*" to run all hosts. or use other filter of your choice

Click "Display advanced fields" -> Concurrency level -> Set to 5 or any number you wish.
 
3. All host jobs failed with following error.

/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 1: ---: command not found
   2:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 2: -: command not found
   3:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 3: pre_tasks:: command not found
   4:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 4: -: command not found
   5:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 5: debug:: command not found
   6:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 6: var:: command not found
   7:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 7: roles:: command not found
   8:
/var/tmp/foreman-ssh-cmd-603ffeb8-a318-415a-a9a1-8e4e5208586a/script: line 8: -: command not found
   9:
Exit status: 127


Actual results:
jobs failed

Expected results:
jobs succeeded

Comment 3 Bryan Kearney 2020-03-27 00:01:27 UTC
Upstream bug assigned to aruzicka

Comment 4 Bryan Kearney 2020-03-27 00:01:29 UTC
Upstream bug assigned to aruzicka

Comment 6 Adam Ruzicka 2020-10-08 11:12:03 UTC
Fixes are merged in upstream, changes in foreman_ansible are released in 6.0.0, required changes in rex are not released yet, they'll most likely will go out in 4.1.1.

Comment 11 Peter Ondrejka 2021-03-02 09:39:21 UTC
Verified on Satellite 6.9 snap 15 using steps from the problem description

Comment 12 wclark 2021-03-08 21:01:22 UTC
Created attachment 1761825 [details]
HOTFIX RPM for Satellite 6.8.4

HOTFIX RPM is available for Satellite 6.8.4. Please find below the installation instructions:

1. Take a backup or snapshot of Satellite server before installing any Hotfix

2. Download the attached Hotfix RPM and copy it to Satellite server

3. # yum install tfm-rubygem-foreman_ansible-5.1.3.2-2.HOTFIXRHBZ1817320.el7sat.noarch.rpm --disableplugin=foreman-protector

4. # satellite-maintain service restart

Comment 14 Mike McCune 2021-04-09 20:02:49 UTC
NOTE: This hotfix is applicable to both 6.8.4, 6.8.5 as they do not update tfm-rubygem-foreman_ansible.

6.8.6 has the full resolution to this bug and will be shipped next week in:

https://bugzilla.redhat.com/show_bug.cgi?id=1943266

Comment 17 errata-xmlrpc 2021-04-21 13:12:29 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 (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


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