Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1105053 - Sometimes virt-who failed to communication with subscription manager
Summary: Sometimes virt-who failed to communication with subscription manager
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python-rhsm
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel72 1133060
TreeView+ depends on / blocked
 
Reported: 2014-06-05 09:50 UTC by Liushihui
Modified: 2019-05-20 11:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-02 20:49:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
rhsm.log (27.58 KB, text/x-log)
2014-06-05 09:52 UTC, Liushihui
no flags Details
virt-who run at vdsm mode (338.12 KB, text/x-log)
2014-07-15 08:37 UTC, Liushihui
no flags Details
virt-who log when it run at rhevm mode (187.22 KB, text/x-log)
2014-07-15 08:41 UTC, Liushihui
no flags Details

Description Liushihui 2014-06-05 09:50:32 UTC
Description of problem:
After system has been registered to SAM server, Though virt-who run normally, it will pop up some error message during communicate with subscription manager occasionally.

Version-Release number of selected component (if applicable):
virt-who-0.9-4.el5
subscription-manager-1.11.3-5.el5
python-rhsm-1.11.3-3.el5

How reproducible:
Always

Steps to Reproduce:
1. Register system to SAM server and make sure virt-who run at libvirtd mode normally
virt-who configuration:
VIRTWHO_BACKGROUND=1
VIRTWHO_DEBUG=1
VIRTWHO_INTERVAL=5
2. Check the virt-who status
[root@dhcp-128-110 libvirt-test-API]# service virt-who status
virt-who (pid  32168) is running...
3. Check the virt-who's log in the /var/log/rhsm/rhsm.log

Actual results:
virt-who run normally, But sometimes it will generate some error log when communicate with subscription-manager
in the log file. For example: "SSLTimeoutError: timed out" and "RestlibException: Runtime Error Batch update returned unexpected 
row count from update [0]; actual row count: 0; expected: 1 at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched:81
". Please see the detail in attachment.

Expected results:
virt-who should communicate with subscription-manager normally when it's running .it shouldn't pop up any error messages in the log file.




Additional info:

Comment 1 Liushihui 2014-06-05 09:52:22 UTC
Created attachment 902472 [details]
rhsm.log

Comment 2 Radek Novacek 2014-06-06 11:24:15 UTC
SSL timeout error doesn't come from virt-who, it's either python-rhsm or SAM. The second one is more probable (because of the exception org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched).

Will reassign it to python-rhsm for now, it might need some check for this error.

Comment 3 Liushihui 2014-07-15 08:34:37 UTC
In the stage candlepin, virt-who will occur similar error messages when it run at the vdsm mode and rhevm mode.
1. If virt-who run at the vdsm mode, virt-who sometimes will pop up the following error messages :
1288 2014-07-14 23:49:54,741 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: []
   1289 2014-07-14 23:49:57,342 [ERROR]  @virt-who.py:223 - Error in communication with subscription manager, trying to recover:
   1290 Traceback (most recent call last):
   1291   File "/usr/share/virt-who/virt-who.py", line 205, in _send
   1292   File "/usr/share/virt-who/subscriptionmanager.py", line 84, in sendVirtGuests
   1293   File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 777, in updateConsumer
   1294   File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 550, in request_put
   1295   File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
   1296   File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 517, in validateResponse
   1297 RemoteServerException: Server error attempting a PUT to /subscription/consumers/e9e259d1-78cd-4d0f-9fd2-1eccb7dc855f returned status         502
   1298 2014-07-14 23:50:04,969 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: []
   1299 2014-07-14 23:50:08,717 [DEBUG]  @subscriptionmanager.py:81 - Sending list of uuids: []

2. If virt-who run at the rhevm mode, virt-who sometimes will pop up the following error messages :
2014-07-15 03:52:43,144 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {'b533383a-97b6-49ad-a898-8a584193b6fc': [], 'd7bb0bf9-17ae-4f1e-9ed8-8463acf7fbec': []}
2014-07-15 03:52:45,972 [ERROR]  @virt-who.py:236 - Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 217, in _send
    result = self.subscriptionManager.hypervisorCheckIn(self.options.owner, self.options.env, virtualGuests, type=self.options.virtType)
  File "/usr/share/virt-who/subscriptionmanager.py", line 112, in hypervisorCheckIn
    return self.connection.hypervisorCheckIn(owner, env, mapping)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 754, in hypervisorCheckIn
    return self.conn.request_post(url, host_guest_mapping)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 553, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 478, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 526, in validateResponse
    handler=handler)
RemoteServerException: Server error attempting a POST to /subscription/hypervisors?owner=7298678&env=7298678 returned status 502
2014-07-15 03:52:47,697 [DEBUG]  @subscriptionmanager.py:109 - Sending update in hosts-to-guests mapping: {'b533383a-97b6-49ad-a898-8a584193b6fc': [], 'd7bb0bf9-17ae-4f1e-9ed8-8463acf7fbec': []}

Comment 4 Liushihui 2014-07-15 08:37:28 UTC
Created attachment 918080 [details]
virt-who run at vdsm mode

Comment 5 Liushihui 2014-07-15 08:41:23 UTC
Created attachment 918082 [details]
virt-who log when it run at rhevm mode

Comment 6 Liushihui 2014-07-30 08:05:08 UTC
It isn't exist on RHEL6.6

Comment 7 Bryan Kearney 2014-09-29 17:54:04 UTC
Acking 7.1

Comment 8 Bryan Kearney 2014-09-29 17:55:23 UTC
Acking 7.1

Comment 12 William Poteat 2015-05-12 19:20:37 UTC
Please open a bug with virt-who component to limit the interval at no less than 1 minute. A virt interval of 5 seconds is not realistic.

Comment 13 Liushihui 2015-05-13 01:53:01 UTC
I have opened a bug 1220977 to track this problem.

Comment 14 Chris Snyder 2015-09-02 20:49:57 UTC
The problems here will be addressed in the virt-who component under bug 1220977


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