Bug 2183430

Summary: [RFE] Satellite have no way to download leapp metadata files and deliver to the client systems while using foreman_leapp plugin
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: Leapp integrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: low Docs Contact:
Priority: low    
Version: 6.12.0CC: aruzicka, egolov, jcastran, lstejska, shwsingh
Target Milestone: UnspecifiedKeywords: FutureFeature
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-11 11:02:39 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 Sayan Das 2023-03-31 05:16:15 UTC
Description of problem:

If using the pre-defined Remote Execution job templates for Leapp Preupgrade and the user have forgot to place the leapp metadata file on the target RHEL client systems, Then Execution of the job on that client system will always result in an inhibitor saying, Leapp cannot download the required json metadata files to proceed further with the upgrade.

Technically, If it is a connected satellite, I would expect Satellite to be able to deliver and set up those leapp metadata files on the client system before running the actual "leapp preupgrade"

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

Satellite 6.11/6.12/6.13


How reproducible:

Always and Easily


Steps to Reproduce:

1. Install and configure a Satellite 6.12 with leapp integration enabled. ( Check Host management guide )

2. Setup the required Repos\CVs in Satellite for RHEL 7 to RHEL 8 upgrade.

3. Register an RHEL 7.9 system with the satellite server and install leapp related packages on it.

4. DON'T setup the leapp metadata files on the system.

5. Execute "Run preupgrade via Leapp" job on the RHEL 7.9 system from Satellite WebUI and observe the results. 

Actual results:

Job Status -> Success

Preupgrade Report UI:

Data file /etc/leapp/files/repomap.json is invalid or could not be retrieved.
client.example.com
High Risk Factor

Data file /etc/leapp/files/device_driver_deprecation_data.json is invalid or could not be retrieved.
client.example.com
High Risk Factor

Actor didn't receive required messages: RepositoriesMapping
client.example.com
High Risk Factor

Data file /etc/leapp/files/pes-events.json is invalid or could not be retrieved.
client.example.com
High Risk Factor
per page


Job Output ->

 119:
============================================================
 120:
                           ERRORS                           
 121:
============================================================
 122:

 123:
2023-03-31 01:09:43.755742 [ERROR] Actor: repository_mapping
 124:
Message: Data file /etc/leapp/files/repomap.json is invalid or could not be retrieved.
 125:
Summary:
 126:
    Details: Could not fetch repomap.json from https://cert.cloud.redhat.com/api/pes/repomap.json (error code: 401).
 127:
    Hint: Read documentation at: https://access.redhat.com/articles/3664871 for more information about how to retrieve the file.
 128:
2023-03-31 01:09:53.063334 [ERROR] Actor: load_device_driver_deprecation_data
 129:
Message: Data file /etc/leapp/files/device_driver_deprecation_data.json is invalid or could not be retrieved.
 130:
Summary:
 131:
    Details: Could not fetch device_driver_deprecation_data.json from https://cert.cloud.redhat.com/api/pes/device_driver_deprecation_data.json (error code: 401).
 132:
    Hint: Read documentation at: https://access.redhat.com/articles/3664871 for more information about how to retrieve the file.
 133:
2023-03-31 01:10:10.734265 [ERROR] Actor: repositories_blacklist
 134:
Message: Actor didn't receive required messages: RepositoriesMapping
 135:
2023-03-31 01:10:11.794680 [ERROR] Actor: pes_events_scanner
 136:
Message: Data file /etc/leapp/files/pes-events.json is invalid or could not be retrieved.
 137:
Summary:
 138:
    Details: Could not fetch pes-events.json from https://cert.cloud.redhat.com/api/pes/pes-events.json (error code: 401).
 139:
    Hint: Read documentation at: https://access.redhat.com/articles/3664871 for more information about how to retrieve the file.


Expected results:

A connected satellite should have mechanism to download and deliver those JSON files to the client system prior to executing the "leapp preupgrade"

If we could come up with a way to

* Download 
https://cert.cloud.redhat.com/api/pes/repomap.json
https://cert.cloud.redhat.com/api/pes/device_driver_deprecation_data.json
https://cert.cloud.redhat.com/api/pes/pes-events.json

* And save them in /pub of satellite.

* Then deliver them by an additional task\job to the client systems prior to executing the leapp preupgrade job

Then perhaps the problem can be resolved. 

But, I leave it to the developers to decide the best course of action that can be taken.


Additional info:

Few ongoing discussions\PR:

https://github.com/oamg/leapp-repository/pull/1046/

https://github.com/theforeman/foreman_rh_cloud/pull/750

Comment 4 jcastran 2023-07-11 13:17:35 UTC
Data is now included in an rpm . This should be resolved by that.

Comment 5 Marek Hulan 2023-08-09 12:46:00 UTC
Can you confirm it now works out of the box just by installing leapp package? Or is that some separate package we need to make sure that is installed? Currently we install leapp on RHEL 7 and leapp-upgrade on RHEL 8. It it should work out of the box, we can close this one as resolved.

Comment 6 jcastran 2023-08-09 20:26:52 UTC
The files are provided by leapp-upgrade-el7toel8 (or el8toel9)

This package is pulled in as a dependency. There is no change to the instructions or packages customers need. Everyone should just have this following the regular instructions.

Comment 7 Marek Hulan 2023-08-11 11:02:39 UTC
Great, thank you for the confirmation! Marking as resolved.