Bug 1210847

Summary: Unable delete the discovered hosts from foreman
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: ProvisioningAssignee: orabin
Status: CLOSED CURRENTRELEASE QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bkearney, cwelton, jmatthew, tkolhar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9488
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 13:57:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1197477    
Bug Blocks:    

Description Brad Buckingham 2015-04-10 17:14:08 UTC
Hi,

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".

Installed foreman-version:
foreman-1.7.2-1.el6.noarch
ruby193-rubygem-foreman_discovery-2.0.0-0.1.rc2.el6.noarch


Any help appreciated.

Thanks
Anil

Comment 1 Brad Buckingham 2015-04-10 17:14:10 UTC
Created from redmine issue http://projects.theforeman.org/issues/9488

Comment 2 Brad Buckingham 2015-04-10 17:14:14 UTC
Upstream bug assigned to orabin

Comment 4 Bryan Kearney 2015-04-10 18:06:38 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9488 has been closed
-------------
Ori Rabin
Applied in changeset commit:foreman_discovery|1bc77ee8f3c82582be79d15df66f787574bc5fa9.

Comment 6 Tazim Kolhar 2015-05-04 12:34:41 UTC
this bz is dependent on bz id : 1197477
once this is fixed . will take this bz for verification

Comment 7 Tazim Kolhar 2015-05-28 09:36:37 UTC
VERIFIED:
# rpm -qa | grep foreman
foreman-1.7.2.25-1.el7sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.5-1.el7sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el7sat.noarch
hp-ml150g6-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
ruby193-rubygem-foreman_docker-1.2.0.14-1.el7sat.noarch
foreman-debug-1.7.2.25-1.el7sat.noarch
foreman-ovirt-1.7.2.25-1.el7sat.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el7sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el7sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.6-1.el7sat.noarch
foreman-selinux-1.7.2.13-1.el7sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el7sat.noarch
foreman-vmware-1.7.2.25-1.el7sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el7sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el7sat.noarch
foreman-proxy-1.7.2.4-1.el7sat.noarch
hp-ml150g6-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
hp-ml150g6-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-2.noarch
foreman-gce-1.7.2.25-1.el7sat.noarch
rubygem-hammer_cli_foreman-0.1.4.12-1.el7sat.noarch
foreman-compute-1.7.2.25-1.el7sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.14-1.el7sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el7sat.noarch
foreman-libvirt-1.7.2.25-1.el7sat.noarch
foreman-postgresql-1.7.2.25-1.el7sat.noarch

steps:
unable delete the discovered hosts from foreman

Comment 8 Bryan Kearney 2015-08-11 13:31:46 UTC
This bug is slated to be released with Satellite 6.1.

Comment 9 Bryan Kearney 2015-08-12 13:57:33 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.