Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1318984

Summary: Failed to send virt-who host/guests json to Satellite 6.2
Product: Red Hat Satellite Reporter: Eko <hsun>
Component: Content ManagementAssignee: Tom McKay <tomckay>
Status: CLOSED ERRATA QA Contact: Katello QA List <katello-qa-list>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, bkearney, chrobert, hartsjc, ktordeur, rbalakri, sgao, shihliu, sreber, tomckay, xdmoon
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:27:18 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:
Bug Depends On:    
Bug Blocks: 1115190    

Description Eko 2016-03-18 10:22:46 UTC
Description of problem:
update Sat6.1 to Sat6.2, virt-who can't send the host/guests json to Sat6.2

Version-Release number of selected component (if applicable):
latest-stable-Satellite-6.2-RHEL-7
virt-who-0.16-7.el6.noarch
subscription-manager-1.16.8-4.el6.x86_64
python-rhsm-1.16.6-1.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. register host to sat2 server
# subscription-manager register --username=admin --password=admin

2. configure virt-who for esx mode
VIRTWHO_ESX=1
VIRTWHO_ESX_OWNER=ACME_Corporation
VIRTWHO_ESX_ENV=Library
VIRTWHO_ESX_SERVER=10.73.2.95
VIRTWHO_ESX_USERNAME=Administrator
VIRTWHO_ESX_PASSWORD=Welcome1!

3. restart virt-who service and check rhsm.log
2016-03-18 18:21:08,718 [virtwho.init INFO] MainProcess(24746):MainThread @virtwho.py:main:729 - Using configuration "env/cmdline" ("esx" mode)
2016-03-18 18:21:08,732 [virtwho.main DEBUG] MainProcess(24749):MainThread @virtwho.py:run:231 - Starting infinite loop with 60 seconds interval
2016-03-18 18:21:08,840 [virtwho.env_cmdline DEBUG] Esx-1(24757):MainThread @virt.py:run:358 - Virt backend 'env/cmdline' started
2016-03-18 18:21:08,840 [virtwho.env_cmdline DEBUG] Esx-1(24757):MainThread @esx.py:_prepare:55 - Log into ESX
2016-03-18 18:21:09,176 [virtwho.env_cmdline DEBUG] Esx-1(24757):MainThread @esx.py:_prepare:58 - Creating ESX event filter
2016-03-18 18:21:09,324 [virtwho.env_cmdline DEBUG] Esx-1(24757):MainThread @virt.py:enqueue:351 - Report for config "env/cmdline" gathered, putting to queue for sending
2016-03-18 18:21:09,335 [virtwho.main DEBUG] MainProcess(24749):MainThread @subscriptionmanager.py:_connect:121 - Authenticating with certificate: /etc/pki/consumer/cert.pem
2016-03-18 18:21:09,570 [virtwho.main DEBUG] MainProcess(24749):MainThread @subscriptionmanager.py:hypervisorCheckIn:162 - Checking if server has capability 'hypervisor_async'
2016-03-18 18:21:09,749 [virtwho.main DEBUG] MainProcess(24749):MainThread @subscriptionmanager.py:hypervisorCheckIn:174 - Server does not have 'hypervisors_async' capability
2016-03-18 18:21:09,749 [virtwho.main INFO] MainProcess(24749):MainThread @subscriptionmanager.py:hypervisorCheckIn:185 - Sending update in hosts-to-guests mapping for config "env/cmdline": 1 hypervisors and 1 guests found
2016-03-18 18:21:09,749 [virtwho.main DEBUG] MainProcess(24749):MainThread @subscriptionmanager.py:hypervisorCheckIn:186 - Host-to-guest mapping: {
    "3e504d56-3982-037b-f3e6-669289892fa1": [
        {
            "guestId": "4206405a-4133-bd0c-f8a5-9c7bc1355837", 
            "state": 1, 
            "attributes": {
                "active": 1, 
                "hypervisorVersion": "6.0.0", 
                "virtWhoType": "esx", 
                "hypervisorType": "VMware ESXi"
            }
        }
    ]
}
2016-03-18 18:21:10,654 [virtwho.main ERROR] MainProcess(24749):MainThread @virtwho.py:send:203 - Unable to send data: Communication with subscription manager failed with code 500: Task 7f83497c-9dcf-4a0f-8b3e-56b3b29cdd73: TypeError: can't cast ActiveSupport::HashWithIndifferentAccess to string
2016-03-18 18:21:10,654 [virtwho.main DEBUG] MainProcess(24749):MainThread @virtwho.py:send_report:168 - Report from "env/cmdline" failed to sent



Actual results:
Unable to send data: Communication with subscription manager failed with code 500: Task 7f83497c-9dcf-4a0f-8b3e-56b3b29cdd73: TypeError: can't cast ActiveSupport::HashWithIndifferentAccess to string

Expected results:
virt-who should send the json data to satellite6.2 normally.

Additional info:

Comment 2 Radek Novacek 2016-03-22 08:00:49 UTC
It seems to be server side issue:

TypeError: can't cast ActiveSupport::HashWithIndifferentAccess to string

Comment 4 Eko 2016-03-31 08:45:06 UTC
This issue blocked virt-who function testing, virt-who can't send the hypervisors(esx,hyper-v,vdsm,rhevm) hosts/guests mapping info to Satellite6.2

Comment 6 Tom McKay 2016-05-11 13:57:48 UTC
Created redmine issue http://projects.theforeman.org/issues/15006 from this bug

Comment 7 Bryan Kearney 2016-05-11 14:14:07 UTC
Upstream bug component is Content Management

Comment 10 Bryan Kearney 2016-05-16 15:59:47 UTC
Moving to POST, please pull in 0.9.54.6.

Comment 11 Eko 2016-05-19 09:29:43 UTC
verified this issue with Satellite-6.2.0-20160518.1 build,
the host/guests mapping info can be sent to sat server by virt-who normally.
verified it.

Comment 13 Bryan Kearney 2016-07-27 11:27:18 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-2016:1501