Bug 2213340 - leapp fails when proxy_scheme is missing from rhsm.conf
Summary: leapp fails when proxy_scheme is missing from rhsm.conf
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: leapp-repository
Version: 7.9
Hardware: All
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Leapp Notifications Bot
QA Contact: upgrades-and-conversions
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-07 21:08 UTC by jcastran
Modified: 2023-07-31 07:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OAMG-9260 0 None None None 2023-06-07 21:09:44 UTC
Red Hat Issue Tracker RHELPLAN-159223 0 None None None 2023-06-07 21:09:35 UTC

Description jcastran 2023-06-07 21:08:56 UTC
If rhsm.conf is missing proxy_scheme, and a proxy is configured, leapp assumes the scheme is https. If the proxy is http, the update fails.

This example is a satellite customer so there is a backup of rhsm.conf to compare. 

~~~
# grep proxy_scheme etc/rhsm/rhsm.conf*
  etc/rhsm/rhsm.conf.rpmnew:proxy_scheme = http
# grep proxy_scheme etc/rhsm/rhsm.conf* -c
  etc/rhsm/rhsm.conf:0
  etc/rhsm/rhsm.conf.rpmnew:1


# grep ^proxy etc/rhsm/rhsm.conf
  proxy_hostname = 10.108.132.161
  proxy_port = 3128
  proxy_user =
  proxy_password =

# grep proxy etc/yum.repos.d/redhat.repo | sort -u
  proxy = http://10.108.132.161:3128
~~~


leapp is defaulting to https

~~~
# sqlite3 leapp.db 'select message_data from messages_data where context = "7d5f75e8-3c0e-4f40-a5ee-f28eaa23d50d"' | jq . | grep 10.108.132.161 -C1 | tail -n3
  "configured_proxies": [
    "https://10.108.132.161:3128"
  ],
~~~


Expectation:
If proxy_scheme is missing, and a proxy is present, then we should report that and request the user correct the missing variable in /etc/rhsm/rhsm.conf


Note You need to log in before you can comment on or make changes to this bug.