Bug 1092385

Summary: rhnAction table not cleaned up while deleting server profile
Product: Red Hat Satellite 5 Reporter: Tim Speetjens <tspeetje>
Component: ServerAssignee: Jan Dobes <jdobes>
Status: CLOSED DEFERRED QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: medium    
Version: 560CC: bugzilla-redhat, tlestach, tscherf
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-21 14:26:46 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:
Bug Depends On:    
Bug Blocks: 924189    

Description Tim Speetjens 2014-04-29 08:18:57 UTC
Description of problem:
When deleting a server profile using the either the WebUI or the API (which both use the delete_server stored procedure), related records in rhnAction table do not get deleted.

Version-Release number of selected component (if applicable):
spacewalk-schema 2.0.2-13

How reproducible:
Delete a system (with some actions recorded)

Steps to Reproduce
1. Register a system
2. Schedule some actions on this system only
3. Remove the system with either WebUI or API

Actual results:
Remaining items can be seen in rhnaction table, with no rhnServerAction records referencing it

Expected results:
Table should not contain any rows when no rhnServerAction records remain, to maintain 1:n relationship

Additional info:
Items in rhnactions/rhnserveractions tables:
List can be constructed with
select sa.action_id from rhnaction a INNER JOIN rhnserveraction sa ON a.id = sa.action_id
where sa.server_id = <systemid>;
After system profile is deleted, existence of rhnserveraction/rhnaction items can be checked with:
select sa.action_id from rhnaction a INNER JOIN rhnserveraction sa ON a.id = sa.action_id
where sa.server_id = <systemid>;
(empty set, records in rhnserveraction table are deleted as expected)

select * from rhnaction where id = <any of list from 1>
(records still exist, but are expected to be deleted as well)

Comment 2 Tomas Lestach 2016-07-21 14:26:46 UTC
We have re-reviewed this bug, as part of an ongoing effort to improve Satellite/Proxy feature and bug updates, review and backlog.

This is a low priority bug and has no currently open customer cases. While this bug may still valid, we do not see it being implemented prior to the EOL of the Satellite 5.x product. Further, this bug does not apply for Satellite 6. As such, this is being CLOSED DEFERRED. 

Closing now to help set customer expectations as early as possible. You are welcome to re-open this bug if needed. 

Xixi, Tomas

Comment 3 Tomas Lestach 2016-07-21 14:58:02 UTC
*** Bug 1116320 has been marked as a duplicate of this bug. ***