Bug 2172118

Summary: Ansible job failed on single host reported as failed on all hosts
Product: Red Hat Satellite Reporter: Radek Mynar <rmynar>
Component: Ansible - Configuration ManagementAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Sam Bible <sbible>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.13.0CC: ehelms, nalfassi
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-02-28 13:01:47 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 Radek Mynar 2023-02-21 14:33:22 UTC
Description of problem:
When an Ansible Command job is launched on multiple hosts and fails on single of them, it is reported as failed on all hosts.

Version-Release number of selected component (if applicable):
Satellite 6.13 SNAP 10.0

How reproducible:
always

Steps to Reproduce:
1. register multiple hosts (self registered satellite and one host may be enough), make sure REX is configured properly
2. create a test directory and test file on single host (i.e. "mkdir /root/testdir; head -c 32768 /dev/random > /root/testdir/testfile") - keep at least one machine without /root/testdir
3. go to Monitor->Jobs->Run Jobs
4. select category "Ansible Commands", template "Run Command - Script Default"
5. select all prepared hosts, list files in /root/testdir (i.e. command "ls -lha /root/testdir")
6. finish wizard, run and wait for results

Actual results:
Job is marked as failed on all hosts although it should pass on hosts with /root/testdir

Expected results:
Job should be marked as failed only on hosts where the subcommand failed (i.e. without /root/testdir)

Additional info:
Launching the same command using SSH (category "Commands", template "Run Command - Script Default") with same search query works as expected

Comment 1 Eric Helms 2023-02-21 16:54:08 UTC
Is this the same as the issue reported here? https://bugzilla.redhat.com/show_bug.cgi?id=2136531

Comment 2 Brad Buckingham 2023-02-23 15:29:57 UTC
Adding needinfo based upon comment 1.

Comment 3 nalfassi 2023-02-28 09:22:02 UTC
Looks like it's also a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2167396

Comment 4 Radek Mynar 2023-02-28 09:36:16 UTC
I can confirm that described behavior is the same as described in both mentioned BZs.

Comment 5 nalfassi 2023-02-28 13:01:47 UTC

*** This bug has been marked as a duplicate of bug 2167396 ***