Project

General

Profile

Actions

Bug #9777

closed

Trying to delete a discovered host after a failed provisioning request fails

Added by Mattias Giese almost 10 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Discovery plugin
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After a failed provisioning attempt of a discovered host i am not able to delete it:

<snip>
ERROR: update or delete on table "hosts" violates foreign key constraint "host_classes_host_id_fk" on table "host_classes" DETAIL: Key (id)=(102) is still referenced from table "host_classes".
</snip>

This is related to http://projects.theforeman.org/issues/9776

Actions #1

Updated by Lukas Zapletal over 9 years ago

  • Status changed from New to Duplicate

Please update to Discovery 2.0.2 which was released yesterday. It fixes the problem and there is a migration that fixes your database as well (you need to run db:migrate rake task).

Let me know if it works please.

Actions #2

Updated by Lukas Zapletal over 9 years ago

  • Related to Bug #9597: FK violation when trying to delete a discovered host after provision added
Actions #3

Updated by Lukas Zapletal over 9 years ago

  • Has duplicate Bug #9488: Unable delete the discovered hosts from foreman added
Actions #4

Updated by Lukas Zapletal over 9 years ago

  • Status changed from Duplicate to New
  • Target version set to Discovery Plugin 3.0.0

We have fixed two similar bugs, but not "host - host_class" relation. Disregard my comment 1, those bugs are similar, but not duplicate.

How do I reproduce this issue?

Actions #5

Updated by Lukas Zapletal over 9 years ago

  • Related to deleted (Bug #9597: FK violation when trying to delete a discovered host after provision)
Actions #6

Updated by Lukas Zapletal over 9 years ago

  • Has duplicate deleted (Bug #9488: Unable delete the discovered hosts from foreman)
Actions #7

Updated by Jasper Capel over 9 years ago

Lukas Zapletal wrote:

We have fixed two similar bugs, but not "host - host_class" relation. Disregard my comment 1, those bugs are similar, but not duplicate.

How do I reproduce this issue?

I am running into this as well.

  1. dpkg -l |grep discovery
    ii ruby-foreman-discovery 3.0.0-1 all Foreman Discovery Plugin
    ii ruby-smart-proxy-discovery 1.0.2-1 all Foreman Smart Proxy plugin to allow bi-directional communication between

I installed foreman from scratch on a fresh ubuntu system, installed the discovery plugin and booted a system into the discovery image. When I attempt to delete the host that was added to foreman automatically, it throws this error. When I remove the token from the table manually, I can delete the host from Foreman.

Actions #8

Updated by Lukas Zapletal almost 9 years ago

  • Target version changed from Discovery Plugin 3.0.0 to Discovery Plugin 6.0

We need to re-test with develop, transactions has been removed now.

Actions #9

Updated by Lukas Zapletal over 8 years ago

  • Status changed from New to Feedback
  • Target version deleted (Discovery Plugin 6.0)

Do you still see this issue with latest stable version? I believe this was fixed. Thanks.

Actions #10

Updated by Anonymous over 7 years ago

  • Status changed from Feedback to Resolved

no reaction, closing

Actions

Also available in: Atom PDF