Bug #35552
closedAccessing an external capsule from UI, shows "Last sync failed: 404 Not Found" even if the last capsule content sync was successful in Satellite 6.12
Description
Description of problem:
Accessing an external capsule from UI, shows "Last sync failed: 404 Not Found" even if the last capsule content sync was successful.
But it does not seems like the error is related to Capsule sync but If the very last task related to that capsule [ lest say a REX job ] fails, then also It shows that error and It can give a very wrong impression to the customer.
The type of search it does for the tasks is "resource_id = 2 AND resource_type = SmartProxy" which is fine but It lists not just the sync tasks but the REX jobs via that capsule as well.
Version-Release number of selected component (if applicable):
Satellite\Capsule 6.12
How reproducible:
Always
Steps to Reproduce:
1. Install A Satellite and External Capsule 6.12
2. Sync some content in satellite as well as capsule
3. Ensure that Ansible feature is not enabled in capsule ( which should be happening by default ).
4. Register a system with capsule via global registration method
5. Turn on the "Prefer registered through Capsule for remote execution" setting in Administer --> Settings --> Content tab of Satellite/
6. Run an Ansible-based job on the target server (ensuring that REX smart-proxy is selected as capsule) and let the job fail.
7. Come back to the Infrastructure --> Capsules page and click open the capsule.
Actual results:
In Step 7,
- Top right corner of the UI will immediately show "Last sync failed: 404 Not Found"
- Under the Content Sync section, the progress bar will be red and halfway filled, giving the notion that Capsule may not have been properly synced.
Expected results:
The "Content Sync" segment or the Capsule sync status in Satellite UI , should only rely on the last successful\failed capsule sync task and It should not show the status based on the status of the last REX job executed on a target host via the capsule.