Bug 1653386

Summary: Can't search for virt-who hypervisors
Product: Red Hat Satellite Reporter: Perry Gagne <pgagne>
Component: Hosts - ContentAssignee: Evgeni Golov <egolov>
Status: CLOSED ERRATA QA Contact: Perry Gagne <pgagne>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: dlezzoum, jomitsch, kuhuang, shisingh, zhunting
Target Milestone: 6.5.0Keywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tfm-rubygem-katello-3.10.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-05-14 12:39: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 Perry Gagne 2018-11-26 17:10:09 UTC
Description of problem: It doesn't seem possible to search for virt-who hypervisors anymore. This seems to be an issue in 6.4.1, (possible 6.4.0) and 6.5


Version-Release number of selected component (if applicable): Sat 6.5.0 snap 5 


How reproducible:


Steps to Reproduce:
1. Configure virt-who to repo hypervisor hosts 
2. In content Host, try to search "hypervisor=True"


Actual results:
No Results returned


Expected results:
Host which are virt-who reported hypervisors are returned. 

Additional info:

Comment 5 John Mitsch 2019-01-07 16:48:51 UTC
Here is what I found:

Upstream - Hypervisor search works
6.5 (satellite-6.5.0-5.beta.el7sat.noarch) - Hypervisor search works
6.4 (satellite-6.4.1-2.el7sat.noarch) - Hypervisor search does not work

It appears this is still an issue in 6.4, I will look for the commit that fixes this bug so we can pull it into 6.4

Comment 7 John Mitsch 2019-01-08 16:22:52 UTC
In 6.4, I believe the difference is what we are getting from candlepin:

6.4: irb(main):006:0> Host.find(6).subscription_facet.consumer_attributes
=> {"autoheal"=>false, "serviceLevel"=>nil, "releaseVer"=>nil, "environment"=>{"id"=>"20301a96cedcb1ef915e2149b300128a"}, "installedProducts"=>[], "guestIds"=>[]}

Compare that with upstream (I had that available to check)

irb(main):007:0> Host.find(8).subscription_facet.consumer_attributes
=> {"autoheal"=>true, "usage"=>nil, "role"=>nil, "addOns"=>[], "serviceLevel"=>"", "releaseVer"=>nil, "environment"=>{"id"=>"64c2cce3716a5bf67b0413fac95e5daa"}, "installedProducts"=>[], "guestIds"=>["b7503e93-0692-42aa-8ec9-32f2f5e99801"]}


upstream has guest ids, which triggers our logic that the host is a hypervisor.

I can look more, but there really isn't a big difference in the 6.5 and 6.4 katello code in this area, so I'm guessing it is related to what we receive from candlepin for the host's subscription facet

Comment 8 John Mitsch 2019-01-08 16:49:37 UTC
Looks like this is actually related to how we are parsing candlepin data, and will be fixed with https://bugzilla.redhat.com/show_bug.cgi?id=1651774

Comment 9 John Mitsch 2019-01-08 16:57:21 UTC
Connecting redmine issue https://projects.theforeman.org/issues/25407 from this bug

Comment 11 Perry Gagne 2019-01-24 19:42:03 UTC
Verified fix in 6.5 snap 12

Searching with hypervisor=True and hypervisor=False give the correct result.

Comment 14 errata-xmlrpc 2019-05-14 12:39: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://access.redhat.com/errata/RHSA-2019:1222