Red Hat Bugzilla – Bug 1300767
Deleted container provider leaves orphaned subordinate resources
Last modified: 2016-10-13 10:50:30 EDT
Description of problem:
Deleted OSE provider leaves orphaned subordinate resources, specifically:
Projects, Routes, Container Services, Replicators, Pods, Containers, Nodes, Images and Registries.
Version-Release number of selected component (if applicable):
Removed OSE provider from VMDB. Subordinate resources remain.
Steps to Reproduce:
1. Remove container provider from VMDB
2. Wait for job to complete
3. Review subordinate resources, Projects for example. Deleted provider's Projects remain in the VMDB.
Container provider's orphaned subordinate resources remain in VMDB, specifically: Projects, Routes, Container Services, Replicators, Pods, Containers, Nodes, Images and Registries.
All subordinate resources should be deleted along with parent provider.
If I recall correctly removal of entities is deferred/collected at a later time (after the provider is deleted). Greg Blomquist for sure knows how this part is supposed to work.
Mooli can you sync with Greg and check if we're missing this cleanup? Thanks!
This does not reproduce on master.
I will test on the reported tag (CFME 5.5.0) tomorrow and see how to proceed.
I can not get a reproduction of this on any environment.
Nick: could you post logs please? specifically we should see a "Record delete initiated" at first and "Removed EMS [<name>] id [<id>]" at the end.
If there is some error we should see a "<name>: Error during destroy:..." msg
(grepping the ems_name should suffice).
the destroy call is enqueued and right after that we should see the 'Removed':
[----] I, [2016-02-14T17:38:49.551490 #24071:7ad988] INFO -- : MIQ(MiqGenericWorker::Runner#get_message_via_drb) Message id: , MiqWorker id: , Zone: [default], Role: , Server: , Ident: [generic], Tar
get id: , Instance id: , Task id: , Command: [ManageIQ::Providers::ContainerManager.destroy], Timeout: , Priority: , State: [dequeue], Deliver On: , Data: , Args: , Dequeued in: [6.454513
[----] I, [2016-02-14T17:38:49.551561 #24071:7ad988] INFO -- : MIQ(MiqQueue#deliver) Message id: , Delivering...
[----] I, [2016-02-14T17:38:50.182974 #24071:7ad988] INFO -- : MIQ(ExtManagementSystem.after_destroy) Removed EMS [erez] id 
Lets continue to debug together if there is nothing interesting in the logs.
There is a possibility that the bug is in the refresh: example: after a refresh
a container_service is added with out an ems_id. Then it will not deleted. Can you maybe reproduce something like that
Note, relevant code around:
ExtManagementSystem.after_destroy and EmsCommon: if task == "destroy"
Hi Mooli, I'm not able to reproduce this. I have since upgraded my environment to 552, perhaps that has resolved the problem. I'll close as not a bug.