Bug 1785250

Summary: When setting foreman_tasks_proxy_batch_trigger to false ansible jobs configured in satellite do not work anymore
Product: Red Hat Satellite Reporter: Francisco Peralta <fperalta>
Component: Ansible - Configuration ManagementAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.6.0CC: bkearney, dmatoule, pierre-yves.goubet
Target Milestone: 6.9.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: 2021-04-21 13:12:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Francisco Peralta 2019-12-19 13:55:26 UTC
This bug was initially created as a copy of Bug #1781671

I am copying this bug because: 

When setting foreman_tasks_proxy_batch_trigger to false as suggested in the other BZ as workaround, ansible jobs do not work anymore in satellite.

I'm currently not aware why setting batch triggering to false should prevent ansible from functioning. Someone would have to look into that.


Description of problem:
When setting foreman_tasks_proxy_batch_trigger to false ansible jobs configured in satellite do not work anymore

Version-Release number of selected component (if applicable):
Satellite 6.6

How reproducible:
always

Steps to Reproduce:
1. Create a job on 3 hosts (use ansible template) 
2. Run the job with foreman_tasks_proxy_batch_trigger to false
3. Observe the times of jobs being not executed.

Actual results:
should run them in parallel at least (no concurrency as in the other BZ)

Expected results:
I would expect that if Satellite is able to run all 3 jobs at once in short time.

Comment 3 Dominik Matoulek 2020-03-02 12:30:24 UTC
Created redmine issue https://projects.theforeman.org/issues/29235 from this bug

Comment 4 Bryan Kearney 2020-03-09 16:05:10 UTC
Upstream bug assigned to aruzicka

Comment 5 Bryan Kearney 2020-03-09 16:05:20 UTC
Upstream bug assigned to aruzicka

Comment 6 Bryan Kearney 2020-08-25 16:01:30 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28612 has been resolved.

Comment 7 Brad Buckingham 2020-11-13 19:24:46 UTC
Fix is in Satellite 6.9 SNAP 1 with tfm-rubygem-foreman_ansible-6.0.0-1.el7sat.noarch

Comment 8 Lukas Pramuk 2021-02-12 00:14:13 UTC
VERIFIED.

@Satellite 6.9.0 Snap12
tfm-rubygem-foreman_ansible-6.0.1-1.el7sat.noarch

by the following reproducer:

1) Set up Satellite and 3 hosts for REX

2) Change Settings ->  Foreman Tasks ->  "Allow Capsule batch tasks" to "No"

3) Run Ansible REX for the 3 hosts

FIX:

>>> all 3 jobs finished successfully at the same time on all hosts


vs.

REPRO:

all 3 jobs failed with:

   1:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 1: ---: command not found
   2:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 2: -: command not found
   3:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 3: tasks:: command not found
   4:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 4: -: command not found
   5:Thu Feb 11 18:25:18 EST 2021
   6:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 5: cmd:: command not found
   7:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 7: register:: command not found
   8:/var/tmp/foreman-ssh-cmd-0fe71302-2942-4e09-8aa3-99ee2bc7a308/script: line 8: -: command not found
   9:Exit status: 127

Comment 11 errata-xmlrpc 2021-04-21 13:12:25 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