Bug 1372585

Summary: policy deletion should remove associated record from foreman_openscap_asset_policies table.
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: SCAP PluginAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED ERRATA QA Contact: Marek Hulan <mhulan>
Severity: medium Docs Contact:
Priority: high    
Version: 6.2.0CC: bbuckingham, ehelms, jcallaha, mhulan
Target Milestone: UnspecifiedKeywords: Triaged
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: 2018-02-21 16:46:41 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:

Description Ranjan Kumar 2016-09-02 06:59:13 UTC
Description of problem:
After policy deletion, the policy record is still present in table foreman_openscap_asset_policies. (Below example policy id 40 do not exist but policy id is still in foreman_openscap_asset_policies) 

foreman=# select id,name from foreman_openscap_policies;
 id |   name   
----+----------
 38 | policy
 42 | policy-2
 43 | policy-3
 44 | policy-4
(4 rows)


foreman=# select * from foreman_openscap_asset_policies ;
 asset_id | policy_id 
----------+-----------
      112 |        38
      114 |        40
      112 |        40
      113 |        40
      113 |        41
      113 |        44
      115 |        44
(7 rows)



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

Comment 1 Bryan Kearney 2016-09-02 08:18:57 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16325 has been resolved.

Comment 4 Bryan Kearney 2018-02-21 16:42:36 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336

Comment 5 Bryan Kearney 2018-02-21 16:46:41 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.

For information on the advisory, and where to find the updated files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0336

Comment 6 Satellite Program 2018-02-21 16:51:07 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> 
> For information on the advisory, and where to find the updated files, follow the link below.
> 
> If the solution does not work for you, open a new bug report.
> 
> https://access.redhat.com/errata/RHSA-2018:0336