Project

General

Profile

Actions

Bug #24269

closed

Can not delete host if there are SCAP reports for that host

Added by Marek Hulán almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Inventory
Target version:
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

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

Description of problem:

If a host has any SCAP reports and you try to delete said host from the Hosts -> All Hosts view or by click on the host and select the delete option then you get the following error message:

error: PG::Error: ERROR: update or delete on table "hosts" violates foreign key constraint "reports_host_id_fk" on table "reports" DETAIL: Key (id)=(43) is still referenced from table "reports". : DELETE FROM "hosts" WHERE "hosts"."type" IN ('Host::Managed') AND "hosts"."id" = $1

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

6.2.4

How reproducible:

Always if a host has any SCAP reports.

Steps to Reproduce:
1. attempt to delete a host that has any SCAP reports

Actual results:

Host deletion fails with cryptic message

Expected results:

The host and the SCAP reports get deleted without error. OR, an option pops up to also delete the SCAP reports or preserve them even after host has been deleted.

Actions #1

Updated by The Foreman Bot almost 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Marek Hulán
  • Pull request https://github.com/theforeman/foreman/pull/5844 added
Actions #2

Updated by Tomer Brisker almost 6 years ago

  • Subject changed from Can not delete host if there are SCAP reports for that host to Can not delete host if there are SCAP reports for that host
  • Target version set to 1.20.0
  • Fixed in Releases 1.20.0 added
Actions #3

Updated by Marek Hulán almost 6 years ago

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

Updated by Tomer Brisker over 5 years ago

  • Category set to Inventory
Actions

Also available in: Atom PDF