Bug 1412425 - [RFE] python-rhsm should provide a default proxy_port
Summary: [RFE] python-rhsm should provide a default proxy_port
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rhsm
Version: 7.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: pre-dev-freeze
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-12 01:58 UTC by Liushihui
Modified: 2020-04-14 12:45 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 12:45:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Liushihui 2017-01-12 01:58:26 UTC
Description of problem:
When it hasn't configure rhsm_proxy_port in /etc/virt-who.d/XXX, virt-who won't check rhsm_proxy_hostname.

Version-Release number of selected component (if applicable):
Satellite6.2.7
virt-who-0.17-10.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1. Configure virt-who with a wrong proxy in /etc/virt-who.d/xxx
[root@hp-z220-05 virt-who.d]# cat /etc/virt-who.d/hyperv 
[test-hyperv1]
type=hyperv
server=10.73.5.227
username=administrator
password="Welcome*&$001"
owner=org1
env=Library 
rhsm_username=admin
rhsm_encrypted_password=7cb1ad2bcbd186c9d9cb6a391361e6ea
rhsm_hostname=hp-bl460cg5-01.rhts.eng.bos.redhat.com
rhsm_port=443
rhsm_prefix=/rhsm
rhsm_proxy_hostname=aaaa               ===> It's wrong

2. Restart virt-who and check virt-who's log
[root@hp-z220-05 virt-who.d]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log

Actual results:
Virt-who can send mapping info to satellite server successfully, it hasn't check rhsm_proxy_hostname.

Expected results:
As it's a wrong rhsm_proxy_hostname, virt-who shouldn't send mapping info to satellite server, it should show error info to remind " Name or service not known"

Additional info:
If configure rhsm_proxy_hostname and rhsm_proxy_host in /etc/virt-who.d/xxx, it can show error info as the following:
"gaierror: [Errno -2] Name or service not known"

Comment 4 Chris Snyder 2017-05-11 20:16:33 UTC
This is a result of the implementation of the UEPConnection in python-rhsm used by virt-who to communicate with Satellite (as well as hosted).

I do not believe this is a bug.

As such I am closing this.

If there is disagreement, please reopen the bug with details as to why this is actually a bug.

Comment 5 Liushihui 2017-05-15 01:45:36 UTC
I think it still is a bug since it should has a default "rhsm_proxy_port" if "rhsm_proxy_port" hasn't be set. 
Actually, we can compare a similar pair of configure "rhsm_hostname and rhsm_port".
1. If it hasn't set "rhsm_port", configure wrong "rhsm_hostname", it will show error info "Name or service not known" since it should has a default "rhsm_port=443", it's the correct behavior.
2. If it hasn't set "rhsm_port", configure correct "rhsm_hostname", it will send mapping info to server,it's the correct behavior.

So I expect the "rhsm_proxy_port and rhsm_proxy_hostname" should have the same behavior as "rhsm_hostname and rhsm_port". 

Therefore, I reopen it. Thanks.


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