Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1379926

Summary: Failed to send host/guests info to SAM when the guest becomes power on/off in vCenter
Product: Red Hat Enterprise Linux 7 Reporter: Eko <hsun>
Component: virt-whoAssignee: Radek Novacek <rnovacek>
Status: CLOSED DUPLICATE QA Contact: Eko <hsun>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: ovasik
Target Milestone: rc   
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: 2016-09-29 01:38:14 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 Eko 2016-09-28 06:55:04 UTC
Description of problem:
power on or power off a guest in vcenter, virt-who failed to send the updated info to SAM, the error message is: 
"Unable to send data: Communication with subscription manager failed with code 500: undefined local variable or method `hypervisor' for #<Class:0x000000059d5828>
"

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

How reproducible:
always


Steps to Reproduce:
1. register virt-who host to SAM [PASS]

2. configure virt-who for esx mode
[test-esx]
type=esx
server=10.73.3.183
username=Administrator
password=Welcome1!
owner=ACME_Corporation
env=Library

3. start virt-who service [PASS]

4. power off a guest in vCenter, and check the rhsm.log [FAILED]
2016-09-28 14:42:25,737 [virtwho.main DEBUG] MainProcess(13079):MainThread @__main__.py:main:19 - virt-who terminated
2016-09-28 14:42:25,861 [virtwho.init DEBUG] MainProcess(13172):MainThread @executor.py:__init__:65 - Using config named 'test-esx'
2016-09-28 14:42:25,861 [virtwho.init INFO] MainProcess(13172):MainThread @main.py:main:160 - Using configuration "test-esx" ("esx" mode)
2016-09-28 14:42:25,861 [virtwho.init INFO] MainProcess(13172):MainThread @main.py:main:162 - Using reporter_id='dhcp-129-186.nay.redhat.com-35b0b97d746f42e6bb8698e8bb9f26f3'
2016-09-28 14:42:25,863 [virtwho.main DEBUG] MainProcess(13172):MainThread @executor.py:run:171 - Starting infinite loop with 60 seconds interval
2016-09-28 14:42:25,893 [virtwho.test-esx DEBUG] Esx-1(13179):MainThread @virt.py:run:364 - Virt backend 'test-esx' started
2016-09-28 14:42:25,893 [virtwho.test-esx DEBUG] Esx-1(13179):MainThread @esx.py:_prepare:128 - Log into ESX
2016-09-28 14:42:26,134 [virtwho.test-esx DEBUG] Esx-1(13179):MainThread @esx.py:_prepare:131 - Creating ESX event filter
2016-09-28 14:42:26,232 [virtwho.test-esx DEBUG] Esx-1(13179):MainThread @virt.py:enqueue:357 - Report for config "test-esx" gathered, putting to queue for sending
2016-09-28 14:42:26,243 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:_connect:124 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-09-28 14:42:26,283 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:172 - Checking if server has capability 'hypervisor_async'
2016-09-28 14:42:26,321 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:184 - Server does not have 'hypervisors_async' capability
2016-09-28 14:42:26,321 [virtwho.main INFO] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Sending update in hosts-to-guests mapping for config "test-esx": 2 hypervisors and 1 guests found
2016-09-28 14:42:26,321 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:196 - Host-to-guest mapping: {
    "7a384d56-085c-0e32-c7ad-f7181c3f6ddf": [
        {
            "guestId": "421a578c-1d65-3813-86da-50810d8c83ef", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "virtWhoType": "esx"
            }
        }
    ], 
    "c74a4d56-677e-dd13-828f-617c5cdf0329": []
}
2016-09-28 14:42:26,642 [virtwho.main DEBUG] MainProcess(13172):MainThread @executor.py:send_report:101 - Report for config "test-esx" sent

========== Start to Power off, check rhsm.log ==========
2016-09-28 14:42:53,443 [virtwho.test-esx DEBUG] Esx-1(13179):MainThread @virt.py:enqueue:357 - Report for config "test-esx" gathered, putting to queue for sending
2016-09-28 14:43:26,676 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:_connect:124 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-09-28 14:43:26,717 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:172 - Checking if server has capability 'hypervisor_async'
2016-09-28 14:43:26,757 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:184 - Server does not have 'hypervisors_async' capability
2016-09-28 14:43:26,757 [virtwho.main INFO] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Sending update in hosts-to-guests mapping for config "test-esx": 2 hypervisors and 1 guests found
2016-09-28 14:43:26,757 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:196 - Host-to-guest mapping: {
    "7a384d56-085c-0e32-c7ad-f7181c3f6ddf": [
        {
            "guestId": "421a578c-1d65-3813-86da-50810d8c83ef", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }
        }
    ], 
    "c74a4d56-677e-dd13-828f-617c5cdf0329": []
}
2016-09-28 14:43:27,177 [virtwho.main ERROR] MainProcess(13172):MainThread @executor.py:send:143 - Unable to send data: Communication with subscription manager failed with code 500: undefined local variable or method `hypervisor' for #<Class:0x000000059d5828>
2016-09-28 14:43:27,177 [virtwho.main DEBUG] MainProcess(13172):MainThread @executor.py:send_report:108 - Report from "test-esx" failed to sent


========= After 1 minute, check the log again, it's sent successfully====
 2016-09-28 14:43:53,445 [virtwho.test-esx DEBUG] Esx-1(13179):MainThread @virt.py:enqueue:357 - Report for config "test-esx" gathered, putting to queue for sending
2016-09-28 14:44:27,212 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:_connect:124 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-09-28 14:44:27,252 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:172 - Checking if server has capability 'hypervisor_async'
2016-09-28 14:44:27,290 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:184 - Server does not have 'hypervisors_async' capability
2016-09-28 14:44:27,290 [virtwho.main INFO] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:195 - Sending update in hosts-to-guests mapping for config "test-esx": 2 hypervisors and 1 guests found
2016-09-28 14:44:27,290 [virtwho.main DEBUG] MainProcess(13172):MainThread @subscriptionmanager.py:hypervisorCheckIn:196 - Host-to-guest mapping: {
    "7a384d56-085c-0e32-c7ad-f7181c3f6ddf": [
        {
            "guestId": "421a578c-1d65-3813-86da-50810d8c83ef", 
            "state": 5, 
            "attributes": {
                "active": 0, 
                "virtWhoType": "esx"
            }
        }
    ], 
    "c74a4d56-677e-dd13-828f-617c5cdf0329": []
}
2016-09-28 14:44:27,607 [virtwho.main DEBUG] MainProcess(13172):MainThread @executor.py:send_report:101 - Report for config "test-esx" sent

Comment 2 Eko 2016-09-29 01:38:14 UTC

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