Bug 2177983 - Is the "http" setting in CHECK_INTERNET_CONNECTION_ADDRESS is right?
Summary: Is the "http" setting in CHECK_INTERNET_CONNECTION_ADDRESS is right?
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: convert2rhel
Version: 7.9
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Bocek
QA Contact: Upgrades and Supportability
Miriam Portman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-14 06:36 UTC by xiaoyali
Modified: 2023-07-09 05:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-03-14 11:46:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELC-960 0 None None None 2023-03-14 06:40:53 UTC
Red Hat Issue Tracker RHELPLAN-151681 0 None None None 2023-03-14 06:40:58 UTC

Description xiaoyali 2023-03-14 06:36:48 UTC
- Description of problem:

When using the latest version convert2rhel-1.1-1.el7, it will give the error when excute the convrt2rhel command which using the RHSM:

$ convert2rhel --username <username> --config-file <config_file_name> --pool <pool_ID>

Checking internet connectivity using address 'http://static.redhat.com/test/rhel-networkmanager.txt'.
[03/14/2023 14:03:45] DEBUG - Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/convert2rhel/main.py", line 90, in main
    systeminfo.system_info.resolve_system_info()
  File "/usr/lib/python2.7/site-packages/convert2rhel/systeminfo.py", line 127, in resolve_system_info
    self.has_internet_access = self._check_internet_access()
  File "/usr/lib/python2.7/site-packages/convert2rhel/systeminfo.py", line 389, in _check_internet_access
    response = urllib.request.urlopen(CHECK_INTERNET_CONNECTION_ADDRESS)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/usr/lib64/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 1244, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "/usr/lib64/python2.7/urllib2.py", line 1217, in do_open
    r = h.getresponse(buffering=True)
  File "/usr/lib64/python2.7/httplib.py", line 1128, in getresponse
    response.begin()
  File "/usr/lib64/python2.7/httplib.py", line 453, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.7/httplib.py", line 409, in _read_status
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib64/python2.7/socket.py", line 476, in readline
    data = self._sock.recv(self._rbufsize)
error: [Errno 104] Connection reset by peer

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

convert2rhel-1.1-1.el7

- How reproducible:

1. Follow the doc:

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/converting_from_an_rpm-based_linux_distribution_to_rhel/index#proc_preparing-for-a-rhel-conversion_converting-from-a-linux-distribution-to-rhel

2. use Convert2RHEL with RHSM.
3. The testOS (Oracle linux/Centos) have the internet connection
4. convert2rhel --username <username> --config-file <config_file_name> --pool <pool_ID> --debug

Actual results:

- Give the error when checking the internet connectivity:

Checking internet connectivity using address 'http://static.redhat.com/test/rhel-networkmanager.txt'.

Expected results:

- Is the "http://static.redhat.com/test/rhel-networkmanager.txt" right?

Should not be the "https://static.redhat.com/test/rhel-networkmanager.txt" which is "https", not "http"?

Additional info:

- I check the src package of the convert2rhel-1.1-1, which change the _check_internet_access() function in systeminfo.py, and the variable CHECK_INTERNET_CONNECTION_ADDRESS is below:


 36 CHECK_INTERNET_CONNECTION_ADDRESS = "http://static.redhat.com/test/rhel-networkmanager.txt"

Is the "http" setting as expect?

Comment 5 Eric Gustavsson 2023-03-14 11:46:17 UTC
Hi! We just released a fix for this in BZ2167327. You can find the advisories here

el7
https://access.redhat.com/errata/RHEA-2023:1197

el8
https://access.redhat.com/errata/RHEA-2023:1196


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