RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1016990 - Rhevm mode:RestlibException appeared in the virt-who log when migrate guest
Summary: Rhevm mode:RestlibException appeared in the virt-who log when migrate guest
Keywords:
Status: CLOSED DUPLICATE of bug 1004616
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-who
Version: 6.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Radek Novacek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-09 06:11 UTC by Liushihui
Modified: 2016-12-01 00:32 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-24 13:07:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Liushihui 2013-10-09 06:11:38 UTC
Description of problem:
During test the Rhel6.5 + Rhevm mode against SAM1.3, When migrate guest, it will pop up error message in the rhsm.log

Version-Release number of selected component (if applicable):
subscription-manager-1.9.7-1.el6.x86_64
python-rhsm-1.9.6-1.el6.x86_64
virt-who-0.8-9.el6.noarch
katello-headpin-1.4.3.19-1.el6sam_splice.noarch
candlepin-0.8.26-1.el6sam.noarch

How reproducible:
Always

Steps to Reproduce:
1. Prepare two RHEL6.5 hosts with latest subscription-manager and virt-who installed. 
Rhel host1 and host2 have been added to Rhevm, And host1 have one guest(vm1)
Our test env as the following:
Rhevm: 10.66.78.64
Rhel host 1: 10.66.100.109
Rhel host 2: 10.66.100.110

2.In the host1, Configure virt-who in rhevm mode as the following:
[root@hp-z220-03 ~]# cat /etc/sysconfig/virt-who 
    VIRTWHO_BACKGROUND=1
    # Enable debugging output.
    VIRTWHO_DEBUG=1
    VIRTWHO_INTERVAL=20
    VIRTWHO_RHEVM=1
    # Option for RHEVM mode
    VIRTWHO_RHEVM_OWNER=ACME_Corporation
    VIRTWHO_RHEVM_ENV=Library
    VIRTWHO_RHEVM_SERVER=https://10.66.78.46:443
    VIRTWHO_RHEVM_USERNAME=admin@internal
    VIRTWHO_RHEVM_PASSWORD=redhat

3.In the host1,retart virt-who service
[root@hp-z220-03 ~]# service virt-who restart
[root@hp-z220-03 ~]# service virt-who status
virt-who (pid  16175) is running...

4. Register the host1 and host2 to SAM server
# Subscription-manager register --username=admin --password=admin

5. Register the vm1 to SAM server
# Subscription-manager register --username=admin --password=admin

6. Monitor the rhsm log :
# tail -f /var/log/rhsm/rhsm.log

7. In the Rhevm's webUI, migrate the vm1 to host2, please see the rhsm.log in the Actually result.

Actual results:
2013-10-08 23:35:01,976 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'1948ec11-1a18-495a-bc5e-733f4de098a4': [], 'fc31f4db-dfa4-440e-94df-c0c74f913320': ['a25bc871-25af-44a8-8083-a3b321ad808e']}
2013-10-08 23:35:22,438 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'1948ec11-1a18-495a-bc5e-733f4de098a4': [], 'fc31f4db-dfa4-440e-94df-c0c74f913320': []}
2013-10-08 23:35:42,864 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'1948ec11-1a18-495a-bc5e-733f4de098a4': ['a25bc871-25af-44a8-8083-a3b321ad808e'], 'fc31f4db-dfa4-440e-94df-c0c74f913320': []}
2013-10-08 23:35:43,107 [ERROR]  @virt-who.py:212 - Error in communication with subscription manager, trying to recover:
Traceback (most recent call last):
  File "/usr/share/virt-who/virt-who.py", line 196, in _send
    result = self.subscriptionManager.hypervisorCheckIn(self.options.owner, self.options.env, virtualGuests)
  File "/usr/share/virt-who/subscriptionmanager.py", line 92, in hypervisorCheckIn
    return self.connection.hypervisorCheckIn(owner, env, mapping)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 738, in hypervisorCheckIn
    return self.conn.request_post(url, host_guest_mapping)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 544, in request_post
    return self._request("POST", method, params)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 469, in _request
    self.validateResponse(result, request_type, handler)
  File "/usr/lib64/python2.6/site-packages/rhsm/connection.py", line 511, in validateResponse
    raise RestlibException(response['status'], error_msg)
RestlibException: undefined local variable or method `hypervisor' for #<Class:0x000000062dd358>
2013-10-08 23:35:43,326 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'1948ec11-1a18-495a-bc5e-733f4de098a4': ['a25bc871-25af-44a8-8083-a3b321ad808e'], 'fc31f4db-dfa4-440e-94df-c0c74f913320': []}


Expected results:
It shouldn't pop up these error messages.It should only pop up the normally log messages after migrate succesfully as the following:
2013-10-08 23:35:43,326 [DEBUG]  @subscriptionmanager.py:89 - Sending update in hosts-to-guests mapping: {'1948ec11-1a18-495a-bc5e-733f4de098a4': ['a25bc871-25af-44a8-8083-a3b321ad808e'], 'fc31f4db-dfa4-440e-94df-c0c74f913320': []}


Additional info:

Comment 2 Radek Novacek 2013-10-09 06:46:10 UTC
(In reply to Liushihui from comment #0)
>     raise RestlibException(response['status'], error_msg)
> RestlibException: undefined local variable or method `hypervisor' for
> #<Class:0x000000062dd358>

This looks like server-side exception. It seems to came through the REST API. What candlepin (instance and version) did you use?

Comment 3 Liushihui 2013-10-09 07:12:34 UTC
(In reply to Radek Novacek from comment #2)
> (In reply to Liushihui from comment #0)
> >     raise RestlibException(response['status'], error_msg)
> > RestlibException: undefined local variable or method `hypervisor' for
> > #<Class:0x000000062dd358>
> 
> This looks like server-side exception. It seems to came through the REST
> API. What candlepin (instance and version) did you use?

I test with the SAM server(SAM version:SAM-1.3.1-RHEL-6-20131007.0),The candlepin version is candlepin-0.8.26-1.el6sam.noarch
SAM server IP:10.66.13.219 username/password: admin/admin

Comment 4 Liushihui 2013-10-12 07:44:40 UTC
Under the ESX mode, it has the same problem.

Comment 5 RHEL Program Management 2013-10-18 08:34:45 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Radek Novacek 2014-03-24 13:07:36 UTC
This is not actual bug in virt-who. It seems that SAM is the cause of this issue.

*** This bug has been marked as a duplicate of bug 1004616 ***


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