Bug 1265103

Summary: virt-who should show connect to rhevm through proxy in the log
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED NOTABUG QA Contact: xingge <gxing>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.2CC: gxing, hsun, ldai, ovasik, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-21 08:37:57 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 Liushihui 2015-09-22 06:53:55 UTC
Description of problem:
When virt-who connect rhevm through proxy ,it hasn't show the proxy's info in the log.

Version-Release number of selected component (if applicable):
virt-who-0.14-8.el7.noarch
subscription-manager-1.15.9-10.el7.x86_64
python-rhsm-1.15.4-5.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1.Make sure virt-who can't connect RHEVM
On rhevm machine:
[root@rhevm354 ~]# iptables -I INPUT -s 10.66.144.4 -j DROP
2.Configure virt-who connect rhevm through proxy
[root@hp-z220-06 network-scripts]# cat /etc/sysconfig/virt-who  | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
https_proxy=https://10.66.128.144:3128
VIRTWHO_RHEVM=1
VIRTWHO_RHEVM_OWNER=ACME_Corporation
VIRTWHO_RHEVM_ENV=Library
VIRTWHO_RHEVM_SERVER=https://10.66.79.83:443
VIRTWHO_RHEVM_USERNAME=admin@internal
VIRTWHO_RHEVM_PASSWORD=redhat
3.Register system to Satellite and restart virt-who, then check the virt-who's log.
[root@hp-z220-06 network-scripts]# tail -f /var/log/rhsm/rhsm.log
2015-09-22 14:39:40,368 [INFO]  @virtwho.py:696 - Using configuration "env/cmdline" ("rhevm" mode)
2015-09-22 14:39:40,370 [DEBUG]  @virtwho.py:215 - Starting infinite loop with 5 seconds interval
2015-09-22 14:39:40,612 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-09-22 14:39:43,423 [DEBUG]  @subscriptionmanager.py:146 - Checking if server has capability 'hypervisor_async'
2015-09-22 14:39:46,362 [DEBUG]  @subscriptionmanager.py:158 - Server does not have 'hypervisors_async' capability
2015-09-22 14:39:46,362 [INFO]  @subscriptionmanager.py:165 - Sending update in hosts-to-guests mapping: {

Actual results:
It hasn't shown virt-who connect rhevm through proxy.

Expected results:
I suggest to show virt-who connect rhevm through proxy in the log. just the same as it on esx mode.

Additional info:
It hasn't this problem when virt-who connect vcenter through proxy. It will show as the following:
**********************************************************************
2015-09-22 14:40:03,142 [DEBUG]  @esx.py:55 - Log into ESX
2015-09-22 14:40:03,142 [DEBUG]  @esx.py:206 - ESX module using proxy: https://10.66.128.144:3128
************************************************************************
2015-09-22 14:40:03,744 [DEBUG]  @esx.py:58 - Creating ESX event filter
2015-09-22 14:40:04,046 [DEBUG]  @esx.py:142 - Waiting for ESX changes
2015-09-22 14:40:04,050 [DEBUG]  @subscriptionmanager.py:112 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2015-09-22 14:40:09,062 [DEBUG]  @esx.py:142 - Waiting for ESX changes
2015-09-22 14:40:09,207 [DEBUG]  @subscriptionmanager.py:146 - Checking if server has capability 'hypervisor_async'
2015-09-22 14:40:14,080 [DEBUG]  @esx.py:142 - Waiting for ESX changes
2015-09-22 14:40:14,772 [DEBUG]  @subscriptionmanager.py:158 - Server does not have 'hypervisors_async' capability
2015-09-22 14:40:14,772 [INFO]  @subscriptionmanager.py:165 - Sending update in hosts-to-guests mapping: {

Comment 1 Radek Novacek 2015-09-22 07:07:34 UTC
This would be nice to have although definitely not critical, let's move to RHEL-7.3.

Comment 2 Radek Novacek 2016-04-21 08:37:57 UTC
virt-who now uses python-requests library for most http and https connections. This library has the proxy support built-in and it not easy to log the proxy setting.

Therefore the proxy logging was removed ESX module too. Closing this bug as NOTABUG.