Project

General

Profile

Bug #7005

Unable to delete host tied back to activation key

Added by Brad Buckingham almost 8 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Web UI
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1122736
Description of problem:
I tried to delete a host and received a trace. Afterwards I could not view the host details though I could see it in the host list

Version-Release number of selected component (if applicable):
ruby193-rubygem-katello-1.5.0-65.el6sat.noarch

How reproducible:
Uncertain, but based on the additional info, probably always

Steps to Reproduce:
1. Create an Activation Key
2. Create a Host and include the activation key

Actual results:
Can't delete the host without error

Expected results:
Host should delete as expected

Additional info:
I had to do the following:
delete from hosts where id = 7;
ERROR: update or delete on table "hosts" violates foreign key constraint "katello_systems_host_id" on table "katello_systems"
DETAIL: Key (id)=(7) is still referenced from table "katello_systems".

delete from katello_systems where id = 11;
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)=(11) is still referenced from table "katello_system_activation_keys".

foreman=# delete from katello_system_activation_keys where id = 11;
DELETE 1
foreman=# delete from katello_systems where id = 11;
DELETE 1
foreman=# delete from hosts where id = 7;
DELETE 1
foreman=# \q


Related issues

Is duplicate of Katello - Bug #6898: deleteing a host does not delete a content host, generates a FK constrain errorDuplicate2014-08-04

Associated revisions

Revision 73ef39f4 (diff)
Added by Brad Buckingham almost 8 years ago

fixes #7005 / BZ 1122736 - content host - change registration behavior with foreman host

This commit alters the behavior of registering a content host
(with or without an activation key) that is to be associated
with a foreman host to do the following:

1. identify the foreman host that this content host will be
associated with by both name and mac address (previously
it was only by name)
2. if the foreman host identified is already associated with a
content host, delete it and then create/associate a new one.
(This will avoid there becoming duplicate content hosts with
the same name.)

Revision cda8940a
Added by Brad Buckingham almost 8 years ago

Merge pull request #4555 from bbuckingham/issue-7005

fixes #7005 / BZ 1122736 - content host - change registration behavior with foreman host

History

#1 Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 54
  • Pull request https://github.com/Katello/katello/pull/4555 added
  • Pull request deleted ()

#2 Updated by Brad Buckingham almost 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Eric Helms almost 8 years ago

  • Triaged changed from No to Yes

#4 Updated by Brad Buckingham almost 8 years ago

  • Is duplicate of Bug #6898: deleteing a host does not delete a content host, generates a FK constrain error added

#5 Updated by Eric Helms almost 8 years ago

  • Legacy Backlogs Release (now unused) set to 13

Also available in: Atom PDF