Bug 1338596

Summary: "Error in communication with subscription manager as BadStatusLine" when restart virt-who
Product: Red Hat Enterprise Linux 7 Reporter: Liushihui <shihliu>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED ERRATA QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: ldai, ovasik, sgao
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: virt-who-0.17-2.el7 Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 05:09:09 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 2016-05-23 05:46:55 UTC
Description of problem:
Sometimes when restart virt-who, it will failed to commnunicate with subscription manager and show error info "BadStatusLine: ''"

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

How reproducible:
20%

Steps to Reproduce:
1. Register system to satellite6.2
2. Configure virt-who run at esx mode 
[root@hp-dl2x170g6-01 virt-who.d]# cat /etc/virt-who.d/esx 
[test-esx1]
type=esx
server=10.73.2.95
username=Administrator
encrypted_password=31b6b72b68fc461a9e7ee6c7f0502350
owner=1ACME_Corporation
env=Library
3. Restart virt-who service and check virt-who's log
2016-05-22 23:52:05,348 [virtwho.main DEBUG] MainProcess(18201):MainThread @executor.py:terminate:303 - virt-who is shutting down
2016-05-22 23:52:08,229 [virtwho.test-esx1 DEBUG] Esx-1(18208):MainThread @virt.py:run:387 - Virt backend 'test-esx1' terminated
2016-05-22 23:52:08,232 [virtwho.main ERROR] MainProcess(18201):MainThread @executor.py:send:156 - Error in communication with subscription manager:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/virtwho/executor.py", line 139, in send
    self._sendGuestAssociation(report)
  File "/usr/lib/python2.7/site-packages/virtwho/executor.py", line 166, in _sendGuestAssociation
    manager.hypervisorCheckIn(report, self.options)
  File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 167, in hypervisorCheckIn
    self._connect(report.config)
  File "/usr/lib/python2.7/site-packages/virtwho/manager/subscriptionmanager/subscriptionmanager.py", line 131, in _connect
    if not self.connection.ping()['result']:
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 876, in ping
    return self.conn.request_get("/status/")
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 681, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 578, in _request
    response = conn.getresponse()
  File "/usr/lib64/python2.7/httplib.py", line 1051, in getresponse
    response.begin()
  File "/usr/lib64/python2.7/httplib.py", line 415, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python2.7/httplib.py", line 379, in _read_status
    raise BadStatusLine(line)
BadStatusLine: ''

Actual results:
Failed to send host/guest mapping info as failed to connect subscription-manager.

Expected results:
Success to restart virt-who service and virt-who can send host/guest mapping info successfully.

Additional info:

Comment 2 Radek Novacek 2016-05-31 08:54:07 UTC
Fixed in virt-who-0.17-2.el7.

Comment 4 Liushihui 2016-07-27 05:09:17 UTC
Verified it on virt-who-0.17-6.el7.noarch since it won't generate these error info when restart virt-who service. Therefore, verify it.

Comment 6 errata-xmlrpc 2016-11-04 05:09:09 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-2387.html