Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1196695

Summary: unable delete the discovered hosts from foreman after installing staypuft
Product: Red Hat OpenStack Reporter: Anil <anilreddyv1>
Component: ruby193-rubygem-staypuftAssignee: Mike Burns <mburns>
Status: CLOSED EOL QA Contact: Omri Hochman <ohochman>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: Foreman (RHEL 6)CC: rhos-maint, srevivo
Target Milestone: ---Keywords: ZStream
Target Release: Installer   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-29 13:44:25 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:

Description Anil 2015-02-26 14:40:22 UTC
Description of problem:

I am unable delete the discovered hosts from foreman, when I attempt to do it, I am getting following error. I have also ensured environment set to non discover (production) and cancelled any build in progress.

Warning!

ERROR: update or delete on table "hosts" violates foreign key constraint "discovery_attribute_sets_host_id_fk" on table "discovery_attribute_sets" DETAIL: Key (id)=(2) is still referenced from table "discovery_attribute_sets".


Logged a case with foreman team and they have suggested to log a BUG here, please see foreman notes on the issue below:

"There is now a related fix by lzap and hopefully it will be merged soon: https://github.com/theforeman/foreman_discovery/pull/161
This fix isn't enough to solve your problem, staypuft needs to change the code for assigning hosts to use the change.
More information here: http://projects.theforeman.org/issues/9546.
You can open up an issue for staypuft to make the needed change here: https://bugzilla.redhat.com/buglist.cgi?component=rubygem-staypuft&list_id=3263530&product=Red%20Hat%20OpenStack"



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

Installed foreman-version:
foreman-1.7.2-1.el6.noarch
ruby193-rubygem-foreman_discovery-2.0.0-0.1.rc2.el6.noarch
foreman-installer-staypuft-0.5.6-1.el6.noarch
foreman-installer-staypuft-client-0.5.6-1.el6.noarch
ruby193-rubygem-staypuft-0.5.19-2.el6.noarch


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 5 Jaromir Coufal 2016-09-29 13:44:25 UTC
Closing list of bugs for RHEL OSP Installer since its support cycle has already ended [0]. If there is some bug closed by mistake, feel free to re-open.

For new deployments, please, use RHOSP director (starting with version 7).

-- Jaromir Coufal
-- Sr. Product Manager
-- Red Hat OpenStack Platform

[0] https://access.redhat.com/support/policy/updates/openstack/platform