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 1195597

Summary: Deleting Hypervisor create by virt-who leave Satellite in inconsistent state
Product: Red Hat Satellite Reporter: Paul Armstrong <parmstro>
Component: RegistrationAssignee: Tom McKay <tomckay>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.8CC: bbuckingham, bkearney, cwelton, greartes, stbenjam, tomckay
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-02-22 15:12:52 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:
Attachments:
Description Flags
modified clean_backend_objects.rake none

Description Paul Armstrong 2015-02-24 07:19:22 UTC
Created attachment 994592 [details]
modified clean_backend_objects.rake

Description of problem:
Hypervisor (somehow) got created by virt-who - turns out to be a Red Hat Storage Node. This is new with RHEV 3.5 apparently...
Tried to delete. 
Delete was partially successful. Leaving hung task.
Unable to use Content Host UI until task cleared. Clear task.
Unable to provision new hosts until inconsistency in DB is fixed.
Unable to reindex.


Version-Release number of selected component (if applicable):
6.0.8

How reproducible:
Unknown. Not willing to try :-)

Steps to Reproduce:
1. As above


Actual results:
Mess

Expected results:
Enable clean-up of hypervisor backend objects.
Do not register RHS nodes as Hypervisors (may be virt-who problem)

Additional info:
Fixed by writing code for clean_backend_objects.rake

/opt/rh/ruby193/root/usr/share/gems/gems/katello-1.5.0/lib/katello/tasks/clean_backend_objects.rake

changed file attached.

Comment 1 RHEL Program Management 2015-02-24 08:15:54 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Paul Armstrong 2015-02-24 20:21:10 UTC
virt-who should not send Gluster Hosts as Hypervisors as they are currently not allowed to run Guests.

/usr/share/virt-who/virt/rhevm

       for host in hosts_xml.findall('host'):
            id = host.get('id')
            mapping[id] = []

Should filter hosts to eliminate Gluster hosts.

Comment 5 Paul Armstrong 2015-07-10 16:15:36 UTC
Comment 3 actually now covered.
https://bugzilla.redhat.com/show_bug.cgi?id=1195939
Status is ON_QA

Thanks for the catch Bryan. Cheers, PA

Comment 6 Stephen Benjamin 2016-02-22 15:12:52 UTC
Hypervisors are deletable, and clean_backend_objects was fixed upstream in http://projects.theforeman.org/issues/9915. 

Thanks!