Project

General

Profile

Bug #17129

Unable to delete content view or version that is associated with a hostgroup

Added by Brad Buckingham over 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
High
Category:
Content Views
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1388173

Description of problem:

Unable to delete a content view or version that is associated with a hostgroup
with a kickstart repository.

How reproducible:
Always

Steps to Reproduce:
1. Create a content view with kickstart repository.
2. Create a hostgroup associate it with CV and lifecycle environment.
3. Select operating system tab, Media selection to synced content and select media.
4. Change the CV and Media selection

5. Attempt to delete the content view version.
6. Unassociate the media from the hostgroup and then attempt to delete the content view version.

7. Attempt to delete the content view.

Actual results:

After step 5, observe the following:

ERROR: update or delete on table "katello_repositories" violates foreign key constraint "hostgroups_kickstart_repository_id_fk" on table "hostgroups" DETAIL: Key (id)=(25) is still referenced from table "hostgroups"

After step 7, observe the following from the Content view deletion task (Monitor -> Tasks)

Cannot delete record because of dependent hostgroups

Expected results:

Should be able to delete the content view and version

Associated revisions

Revision 6025e0de (diff)
Added by Brad Buckingham over 5 years ago

fixes #17129 - allow deletion of cv & version associated w/ hg

This commit contains changes to allow deletion of a content
view version and view that has associations to a hostgroup
via the content view and media (synced content) settings.

Without it,
- deleting a version would show:

ERROR: update or delete on table "katello_repositories"
violates foreign key constraint
"hostgroups_kickstart_repository_id_fk"
on table "hostgroups" DETAIL: Key (id)=(25) is still
referenced from table "hostgroups"

- deleting a view would show:

Cannot delete record because of dependent hostgroups

History

#1 Updated by Brad Buckingham over 5 years ago

  • Subject changed from Unable to delete content view or version that is associated with a hostgroup to Unable to delete content view or version that is associated with a hostgroup
  • Assignee set to Brad Buckingham
  • Target version set to 133
  • Legacy Backlogs Release (now unused) set to 197
  • Difficulty set to easy

#2 Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/6418 added

#3 Updated by Brad Buckingham over 5 years ago

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

Also available in: Atom PDF