Bug 1428595

Summary: Containers - old archived container entities are not purged
Product: Red Hat CloudForms Management Engine Reporter: Ari Zellner <azellner>
Component: ProvidersAssignee: Ari Zellner <azellner>
Status: CLOSED CURRENTRELEASE QA Contact: Einat Pacifici <epacific>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: azellner, fsimonce, jfrey, jhardy, lavenel, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard: container
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1448148 1458333 (view as bug list) Environment:
Last Closed: 2018-03-06 15:58:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1448148, 1458333    

Description Ari Zellner 2017-03-02 22:39:31 UTC
Description of problem:
old archived container images fill up the db and need to be purged

Version-Release number of selected component (if applicable):
CloudForms 4.2
OpenShift Container Platform 3.4

How reproducible:
Add an active openshift provider in which containers and images and get added and deleted

Steps to Reproduce:
1. Add an OCP provider

Actual results:
DB table for container images fills ups and is never cleared

Expected results:
Container images deleted more than 6 months ago should no longer appear

Comment 2 Federico Simoncelli 2017-03-02 22:45:53 UTC
Ari now that I think of it we should probably extend this to the other archived entities (Pods, Containers and Projects IIRC).
If so then it's probably worth reflect that in the title of the BZ.

Comment 3 Ari Zellner 2017-03-14 14:02:34 UTC
Upstream PR: https://github.com/ManageIQ/manageiq/pull/14322

Comment 4 Ari Zellner 2017-04-24 13:48:19 UTC
Upstream PR merged. federico, this is targetted for 5.7.3 but is that where we want it?

Comment 5 Federico Simoncelli 2017-04-27 07:44:40 UTC
(In reply to Ari Zellner from comment #4)
> Upstream PR merged. federico, this is targetted for 5.7.3 but is that where
> we want it?

Yes this has to reach 5.7 z-stream. By definition it means that it must be in 5.8.
"Target Release" is a single field and this should be noticed on cloning.

Ari, should this be on POST?

Comment 8 Einat Pacifici 2017-11-12 13:07:28 UTC
Verified. 
Added/deleted containers with different images. DB was checked and images were purged.