Bug 1369634

Summary: It will show error page's html code in log when virt-who received "Invalid response (403) from Hyper-V"
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Nikos Moumoulidis <nmoumoul>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: low Docs Contact:
Priority: medium    
Version: 7.3CC: ldai, nmoumoul, sgao, wpoteat, yuefliu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 12:40:46 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:
Attachments:
Description Flags
rhsm.log none

Description Liushihui 2016-08-24 03:30:28 UTC
Description of problem:
When virt-who failed to connect hyperv through proxy, it will show the error page's html code in the log.

Version-Release number of selected component (if applicable):
virt-who-0.17-7.el7.noarch 
subscription-manager-1.17.10-1.el7.x86_64 
python-rhsm-1.17.6-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
Precondition:
virt-who can't connect hyperv directly.
Process:
1. Register system to stage candlepin.
2. Configure virt-who run at hyperv mode and connect hyperv through proxy
[root@cloud-qe-16-vm-03 virt-who.d]# cat /etc/sysconfig/virt-who  | grep -v ^# | grep -v ^$
VIRTWHO_DEBUG=1
http_proxy=http://10.73.3.248:3128
[root@cloud-qe-16-vm-03 virt-who.d]# cat /etc/virt-who.d/hyperv 
[test-hyperv]
type=hyperv
server=10.73.5.203
username=administrator
password=Welcome1
owner=8036391
env=Library
[root@cloud-qe-16-vm-03 virt-who.d]# service virt-who restart
3. Check virt-who's log
[root@cloud-qe-16-vm-03 virt-who.d]#  tail -f /var/log/rhsm/rhsm.log

Actual results:
It will show the error page's html code in the virt-who's log. please see detail in attachment.
2016-08-23 22:52:38,446 [virtwho.test-hyperv DEBUG] HyperV-1(13465):MainThread @hyperv.py:post:342 - Invalid response (403) from Hyper-V: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
 /*
 Stylesheet for Squid Error pages
 Adapted from design by Free CSS Templates
 http://www.freecsstemplates.org
 Released for free under a Creative Commons Attribution 2.5 License
*/

/* Page basics */
* {
	font-family: verdana, sans-serif;
}

html body {
	margin: 0;
	padding: 0;
	background: #efefef;
	font-size: 12px;
	color: #1e1e1e;
}

/* Page displayed title area */
#titles {
	margin-left: 15px;
	padding: 10px;
	padding-left: 100px;
	background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left;
}
........
........
</body></html>

Expected results:
It shouldn't show this error page's html code in the log, it should only show " Invalid response (403) from Hyper-V: " in the log.

Additional info:

Comment 1 Liushihui 2016-08-24 05:14:51 UTC
Created attachment 1193468 [details]
rhsm.log

Comment 6 errata-xmlrpc 2019-08-06 12:40:46 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://access.redhat.com/errata/RHBA-2019:2070