Description of problem:
"RemoveInsightsHostsJob" step in "InventoryScheduledSync " task could fail with "No hosts found for deletion" if there are multiple organizations in the Satellite.
Satellite sends request to the RH cloud to delete hosts that don't exist in the organization. Since the requested host uuids don't exist in the organization, RH cloud responds with 404 status code and "No hosts found for deletion" error message.
The culprit is in this line that doesn't filter by organization:
How reproducible:
Easy
Is this issue a regression from an earlier version:
Not sure.
Steps to Reproduce:
- Setup a Satellite that contains multiple organizations.
- Enable the auto inventory sync.
- Register some hosts to each organizations.
- Manually upload the inventory or wait for the next scheduled inventory sync job to complete.
- Delete a couple of hosts from the Satellite.
- Wait for the next invenotry sync.
Actual behavior:
Satellite scheduled 1 inventory sync task for each organization. one or more of the tasks could fail with "No hosts found for deletion"
Expected behavior:
No error
- links to