Bug 2049701

Summary: Leapp cannot fetch the repomap from the cloud despite Insights registered
Product: Red Hat Enterprise Linux 7 Reporter: Christophe Besson <cbesson>
Component: leapp-repositoryAssignee: Leapp team <leapp-notifications>
Status: CLOSED CURRENTRELEASE QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: low Docs Contact:
Priority: low    
Version: 7.9CC: jcastran, mreznik, pstodulk, rdulhani
Target Milestone: rcKeywords: Reproducer
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: leapp-repository-0.18.0-3.el7_9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-12 07:56:44 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 Christophe Besson 2022-02-02 14:57:07 UTC
Description of problem:
In order to download automatically the leapp data files (repomap, pes-events, ...), one way to achieve it is a registration to RHEL Insights.
When a system is using RHUI (like AWS PAYG), there is no subscription (as per subscription-manager). In this case, Insights must be configured with BASIC auth and the RH customer portal credentials (or possibly a dedicated one).

Despite the registration, it does not work.

Version-Release number of selected component (if applicable):
leapp-upgrade-el7toel8-0.15.0-6

How reproducible:
Always for the customer.
Able to reproduce internally with custom repos and --no-rhsm.

Steps to Reproduce:
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.9 (Maipo)

# uname -r
3.10.0-1160.53.1.el7.x86_64

# insights-client --register
Successfully registered host localhost.localdomain
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for localhost.localdomain
Uploading Insights data.
Successfully uploaded report from localhost.localdomain to account 540155.
View the Red Hat Insights console at https://cloud.redhat.com/insights/

# insights-client --status
System is registered locally via .registered file. Registered at 2022-02-02T15:42:17.471931
Insights API confirms registration.

# yum repolist -v | grep baseurl
Repo-baseurl : http://XXXXX.redhat.com/content/dist/rhel/server/7/7Server/x86_64/os
Repo-baseurl : http://XXXXX.redhat.com/content/dist/rhel/server/7/7Server/x86_64/extras/os/

# leapp preupgrade --no-rhsm --enable el7 --enable el7-extras --debug

Actual results:
2022-02-02 15:45:43.074907 [ERROR] Actor: repository_mapping
Message: Data file /etc/leapp/files/repomap.json is invalid or could not be retrieved.
Summary:
    Details: Could not fetch repomap.json from https://cert.cloud.redhat.com/api/pes/repomap.json (missing certificates). Is the machine registered?
    Hint: Read documentation at: https://access.redhat.com/articles/3664871 for more information about how to retrieve the file.

Expected results:
Data are downloaded.

Additional info:
As a workaround, downloading the tarball from this site is needed
https://access.redhat.com/articles/3664871

Comment 7 jcastran 2023-07-11 13:20:58 UTC
The data is now in an rpm. This should be resolved

Comment 8 Petr Stodulka 2023-07-12 07:56:44 UTC
You are right. Thanks for the reminder! :) Closing as current release as the data is always available on the machine when the latest rpm is installed.