Bug 1458552

Summary: Archived container entities are not destroyed when the provider is deleted
Product: Red Hat CloudForms Management Engine Reporter: Ari Zellner <azellner>
Component: ProvidersAssignee: Ari Zellner <azellner>
Status: CLOSED CURRENTRELEASE QA Contact: Einat Pacifici <epacific>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.8.0CC: gblomqui, jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1458811 1460397 (view as bug list) Environment:
Last Closed: 2018-03-06 15:09:36 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: 1458811, 1460397    

Description Ari Zellner 2017-06-04 09:44:56 UTC
Description of problem:
If a containers provider has some archived entities and then its deleted, the archived entities will remain forever in the DB

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

How reproducible:
Always

Steps to Reproduce:
1. add an openshift provider and refresh
2. remove either a pod or a project from the openshift environment
3. refresh again and delete provider

Actual results:
the entity removed from the environment is still in the DB

Expected results:
the entity should not be in the DB

Additional info:

Comment 3 Satoe Imaishi 2017-06-07 18:22:48 UTC
PR: https://github.com/ManageIQ/manageiq/pull/14359

Comment 5 Pavel Zagalsky 2017-11-14 13:22:56 UTC
I can still see the deleted project although with deleted_on status:

vmdb_production=# SELECT * FROM container_projects;

 16 | 5bd75afc-c937-11e7-bc5a-001a4a16984a | bz-stuff         | 2017-11-14 12:28:45 | 7245448          | Verifying    |      2 | 2017-11-14 12:29:38.348377 | 2017-11-14 12:31:39.573588 |

Comment 6 Ari Zellner 2017-11-26 13:01:52 UTC
Pavel, I cant manage to reproduce this. 
Are you sure the provider was already deleted when you checked the db?
Lately destroying providers takes a while because we wait for associated workers to be destroyed.

Comment 7 Pavel Zagalsky 2017-11-27 13:26:22 UTC
Ari, I'll try to recreate this issue with you later this week.

Comment 8 Barak 2017-12-07 14:14:30 UTC
Per comments 6 & 7 moving this bug back to ON_QA,
Pavel if you reproduce it (pay attention the provider was actually deleted) , please reopen

Comment 9 Pavel Zagalsky 2017-12-10 08:54:25 UTC
My bad, forgot to delete the provider..