Bug 2097751

Summary: Traceback in production.log while trying to remediate issue from c.r.c when inventory status on satellite is not synced.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: RH Cloud - Cloud ConnectorAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: aruzicka, sshtein
Target Milestone: UnspecifiedKeywords: Triaged
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: 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 Jameer Pathan 2022-06-16 12:59:24 UTC
Description of problem:
Traceback in production.log while trying to remediate issue from c.r.c when inventory status on satellite is not synced.

Version-Release number of selected component (if applicable):
- Satellite 6.11.0 snap 25
- rubygem-foreman_rh_cloud-5.0.39-1.el8sat.noarch

How reproducible:
- Tried once

Steps to Reproduce:
1. Configure RHC on Satellite (Go to Configure > Inventory upload > Click on "Configure Cloud Connector" button.)
2. Register Host with satellite and Insights.
3. Try to remediate Insights issue from c.r.c
4. Check /var/log/foreman/production.log on Satellite.

Actual results:
- Traceback with following message.
2022-06-16T08:02:20 [W|app|5b7270f6] Some hosts were not found/ignored. 
Looked for: ["1c9ddase4-2764-439a-bc54-b390dasb73f1", 
"c8dsa2809-bc9a-46be-90f0-91385das6d5bb"], found ids: []

Expected results:
- No traceback in production.log
- Proper error message shown either on c.r.c or Satellite.

Additional info:
- This happens when the inventory status on satellite is not synced.
(Go to Configure > Inventory upload > Click on "Sync Inventory status".)

Comment 2 Shimon Shtein 2022-06-16 13:06:01 UTC
This will need a change in the code to avoid executing a REX job on an empty list of hosts.

Comment 3 Brad Buckingham 2022-06-16 14:02:55 UTC
*** Bug 2097749 has been marked as a duplicate of this bug. ***