Bug 1318083 - virt-who failed to connection rhevm through proxy since rhevh7.2 with old python-rhsm package
Summary: virt-who failed to connection rhevm through proxy since rhevh7.2 with old pyt...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: rhev-hypervisor
Version: 3.6.3
Hardware: x86_64
OS: Linux
high
urgent
Target Milestone: ovirt-4.0.0-alpha
: ---
Assignee: Douglas Schilling Landgraf
QA Contact: Liushihui
URL:
Whiteboard:
Depends On:
Blocks: 1319050
TreeView+ depends on / blocked
 
Reported: 2016-03-16 02:18 UTC by Liushihui
Modified: 2016-08-23 21:05 UTC (History)
16 users (show)

Fixed In Version: rhev-hypervisor7-ng-3.6-20160429.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1319050 (view as bug list)
Environment:
Last Closed: 2016-08-23 21:05:48 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:
shihliu: needinfo+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1702 0 normal SHIPPED_LIVE redhat-virtualization-host bug fix and enhancement update for RHV 4.0 2016-08-24 00:35:27 UTC

Description Liushihui 2016-03-16 02:18:50 UTC
Description of problem:
Config virt-who connect rhevm with proxy, although virt-who can access the rhevm normally with squid proxy, but it failed to send mapping info to SAM server as "no_proxy" configure hasn't taken effect, it will take effect in python-rhsm-1.15.1-1 or newer.

Version-Release number of selected component (if applicable):
Rhev-hypervisor7-7.2-20160302.1
virt-who-0.14-9.el7.noarch
vdsm-4.17.23-0.el7ev.noarch
subscription-manager-1.10.14-10.el7.x86_64
python-rhsm-1.13.2-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Register system to SAM
2. Configure virt-who connect with rhevm with proxy.
[root@localhost admin]# cat /etc/sysconfig/virt-who  | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
https_proxy=https://10.73.2.81:3128
no_proxy=samserv.redhat.com
VIRTWHO_RHEVM=1
VIRTWHO_RHEVM_OWNER=ACME_Corporation
VIRTWHO_RHEVM_ENV=Library
VIRTWHO_RHEVM_SERVER=https://10.73.2.65:443
VIRTWHO_RHEVM_USERNAME=admin@internal
VIRTWHO_RHEVM_PASSWORD=redhat
3. Restart virt-who service and check virt-who's log
[root@localhost admin]# service virt-who restart && tail -f /var/log/rhsm/rhsm.log

2016-03-16 02:04:10,989 [INFO]  @virtwho.py:697 - Using configuration "env/cmdline" ("rhevm" mode)
2016-03-16 02:04:10,990 [DEBUG]  @virtwho.py:216 - Starting infinite loop with 3600 seconds interval
2016-03-16 02:04:11,419 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-03-16 02:04:11,463 [ERROR]  @virtwho.py:190 - Error in communication with subscription manager:
Traceback (most recent call last):
  File "/usr/share/virt-who/virtwho.py", line 173, in send
    self._sendGuestAssociation(report)
  File "/usr/share/virt-who/virtwho.py", line 204, in _sendGuestAssociation
    report.config.type)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 145, in hypervisorCheckIn
    self._connect(config)
  File "/usr/share/virt-who/manager/subscriptionmanager/subscriptionmanager.py", line 120, in _connect
    if not self.connection.ping()['result']:
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 705, in ping
    return self.conn.request_get("/status/")
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 550, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 453, in _request
    conn.request(request_type, handler, body=body, headers=headers)
  File "/usr/lib64/python2.7/httplib.py", line 979, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.7/httplib.py", line 1013, in _send_request
    self.endheaders(body)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 198, in endheaders
    httpslib.HTTPSConnection.endheaders(self)
  File "/usr/lib64/python2.7/httplib.py", line 975, in endheaders
    self._send_output(message_body)
  File "/usr/lib64/python2.7/httplib.py", line 835, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.7/httplib.py", line 797, in send
    self.connect()
  File "/usr/lib64/python2.7/site-packages/M2Crypto/httpslib.py", line 206, in connect
    raise socket.error, "Proxy connection failed: %d" % code
error: Proxy connection failed: 404

Actual results:
Virt-who can access the rhevm normally with squid proxy, but it failed to send mapping info to satellite server and return 404 error 

Expected results:
rhevh7.2 should use the python-rhsm-1.15.1-1 or newer. Then Virt-who can connect rhevm successfully through proxy and "no_proxy" configure can take effect.

Additional info:
Please see a similar bug on rhel6.8:
https://bugzilla.redhat.com/show_bug.cgi?id=1309611

Comment 1 Fabian Deutsch 2016-03-16 09:05:54 UTC
 Liushihui, do you know in which channel python-rhsm-1.15.1-1 was released?

Comment 2 Fabian Deutsch 2016-03-16 09:08:18 UTC
I actually see now that an even newer version was released in RHBA-2015:2122 in RHEL 7.

From where is it expected that we retrieve python-rhsm?
From Satellite (where we retrieve it from today) or from some other source?

Comment 3 Liushihui 2016-03-16 09:30:54 UTC
Fabian, Rhel7.2 released with python-rhsm-1.15.4- 5(https://errata.devel.redhat.com/advisory/20904),we have test this released version and it hasn't this problem. so could you get it from rhel7.2 related channel?

Comment 4 Fabian Deutsch 2016-03-16 09:50:12 UTC
Yes, we can get that package from RHEL.

But what I need to understand: Are there other packages in RHEV-H related to RHN/RHSM.
And where should we get those packages from?

Comment 8 Ying Cui 2016-03-17 07:28:18 UTC
Consider the wrong rhsm pkgs were built into rhev-hypervisor 7.2 for 3.6, Entitlement QE can not start their valid testing on this build. 
So I added "TestBlocker" keyword into this bug to get the fix soon. Thanks.

Comment 15 Fabian Deutsch 2016-04-11 09:09:31 UTC
Please verify this bug with the latest RHEV-H 3.6 build, this bug should be fixed.

Comment 16 Eko 2016-05-17 07:08:29 UTC
with following options, virt-who can send the mapping info to satellite6.1.8 normally, verified it.
no_proxy=satserv.redhat.com
http_proxy=http://10.73.2.81:3128

Comment 18 errata-xmlrpc 2016-08-23 21:05:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1702.html


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