Bug 2012897

Summary: When removing an associated CR host from Satellite it fails as 'PG::ForeignKeyViolation'.
Product: Red Hat Satellite Reporter: Rudnei Bertol Jr. <rbertolj>
Component: Compute ResourcesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: high    
Version: 6.9.0CC: ahumbe, ajambhul, akapse, aruzicka, hakon.gislason, inecas, jiri.blaha, kkinge, michaelparin, momran, ramsingh, rlavi, satellite6-bugs, saydas, shane.seymour, shwsingh, tim.denholm, vdeshpan
Target Milestone: UnspecifiedKeywords: PrioBumpGSS
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-08-10 16:21:15 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 Rudnei Bertol Jr. 2021-10-11 14:39:19 UTC
Description of problem:

When deleting a host that is 'Associated' to a computer resource, and there is a 'before_update' hook configured on the Satellite it, fails to delete the host like the following output.

~~~
PG::ForeignKeyViolation: ERROR: update or delete on table "hosts" violates foreign key constraint "host_status_hosts_host_id_fk" on table "host_status" DETAIL: Key (id)=(HOST_ID) is still referenced from table "host_status".
~~~

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

Satellite 6.9


How reproducible:

There is a reproducer configured in our laboratory.


Steps to Reproduce:
1. 
2.
3.

Actual results:

It is failing to delete a host.


Expected results:

The host should be deleted smoothly.

Additional info:

Comment 13 Brad Buckingham 2023-08-10 16:21:15 UTC
The team has been unable to reproduce the behavior described on Satellite 6.12.z, 6.13.z and the upcoming 6.14.0 (internal builds) release.  For this reason, we are moving this to CLOSED:CURRENTRELEASE.

If there are concerns or the issue persists, please feel free to re-open providing details to reproduce.

Thanks!