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 1125020

Summary: Non existent host listed in Hosts->All Hosts
Product: Red Hat Satellite Reporter: James Genus Jr. <jgenus>
Component: ProvisioningAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hutaƙ <jhutar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.2CC: bbuckingham, cwelton, jgenus, jhutar, xdmoon
Target Milestone: UnspecifiedKeywords: 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: 2014-09-11 12:21:48 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: 1125023    

Description James Genus Jr. 2014-07-30 21:34:57 UTC
Description of problem:

Unable to delete host. Host appears in Hosts->All Hosts.

When deletion attempt occurs

Operation FAILED: Katello::Resources::Candlepin::CandlepinResource: 410 Gone {"displayMessage":"Unit c1241a1b-ec53-4396-a603-6da925a440d0 has been deleted","requestUuid":"a1528298-2fb0-4d28-b6c4-ccb31d54e660","deletedId":"c1241a1b-ec53-4396-a603-6da925a440d0"} (GET /candlepin/consumers/c1241a1b-ec53-4396-a603-6da925a440d0/compliance)




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


How reproducible:


Steps to Reproduce:
1. Hosts->All Hosts
2. Select Host to delete
3. Read error mesage

Actual results:

No host deletion

Expected results:

Removal of host entry from Hosts->All Hosts

Additional info:

Comment 1 RHEL Program Management 2014-07-30 21:43:44 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 Justin Sherrill 2014-07-31 14:26:15 UTC
Do you know the steps that got you in this state?

Comment 4 James Genus Jr. 2014-07-31 14:46:42 UTC
Based on my investigation the problem happened earlier with another system based on foreman-rake  katello:clean_backend_objects --trace output:

*** snip ***
System 4 smccarty-test-sat6.rhsat.rdu.salab.redhat.com 0369801a-55d7-4a63-80c7-63f68f26a652 is partially missing.  Cleaning.
rake aborted!

caused by: (PGError) ERROR:  update or delete on table "katello_systems" violates foreign key constraint "system_activation_keys_system_id_fk" on table "katello_system_activation_keys"
DETAIL:  Key (id)=(4) is still referenced from table "katello_system_activation_keys".
*** snip ***

I'm not sure how that condition came into being. Guessing activation key was deleted first. 

The above referenced system is still visible:

root@satellite ~]# hammer host list
---|-------------------------------------------------------|------------------|------------|--------------|------------------
ID | NAME                                                  | OPERATING SYSTEM | HOST GROUP | IP           | MAC              
---|-------------------------------------------------------|------------------|------------|--------------|------------------
14 | jgenus-sat6-demo-1.rhsat.rdu.salab.redhat.com         | RHEL Server 6.5  | Wordpress  | 10.11.88.145 | 00:1a:4a:0b:a9:fd
20 | jgenus-sat6-demo-client-2.rhsat.rdu.salab.redhat.com  | RHEL Server 6.5  | Wordpress  | 10.11.88.150 | 00:14:4a:23:67:55
1  | satellite.rhsat.rdu.salab.redhat.com                  | RHEL Server 6.5  |            | 10.11.88.2   | 00:1a:4a:0b:a9:bd
10 | smccarty-sat6-client-demo1.rhsat.rdu.salab.redhat.com | RHEL Server 6.5  | Wordpress  | 10.11.88.128 | 00:1a:4a:0b:ba:87
9  | smccarty-sat6-client-demo2.rhsat.rdu.salab.redhat.com | RHEL Server 6.5  | Wordpress  | 10.11.88.129 | 00:1a:4a:0b:ba:89
7  | smccarty-test-sat6.rhsat.rdu.salab.redhat.com         | RHEL Server 6.5  | Wordpress  | 10.11.88.123 | 00:1a:4a:0b:ba:d6
3  | wordpress1.rhsat.rdu.salab.redhat.com                 | RHEL Server 6.5  | Wordpress  | 10.11.88.104 | 00:1a:4a:0b:ba:b1
---|-------------------------------------------------------|------------------|------------|--------------|------------------

ID=4 related activation key does not exsist:

[root@satellite ~]# hammer activation-key  list --organization ACME_Corporation
---|---------------|----------------|-----------------------|-------------
ID | NAME          | CONSUMED       | LIFECYCLE ENVIRONMENT | CONTENT VIEW
---|---------------|----------------|-----------------------|-------------
1  | LAMP-Complete | 6 of Unlimited | Development           | LAMP-Press  
---|---------------|----------------|-----------------------|-------------

Suspect my attempts to delete jgenus-sat6-demo-1.rhsat.rdu.salab.redhat.com are queued pending smccarty-test-sat6.rhsat.rdu.salab.redhat.com clean up.

It's stopping deployments to the RHEV compute resources. The mac address for jgenus-sat6-demo-1.rhsat.rdu.salab.redhat.com mac address hasn't been released.

PXE installations in the RHEV environment still work.

Comment 5 Brad Buckingham 2014-08-09 13:39:58 UTC
Justin, if you find that the issue raised here is related to the foreign key error mentioned in comment #2, that issue should no longer occur if the solution for bug 1122736 goes in.

Comment 7 Bryan Kearney 2014-09-11 12:21:48 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.