Bug 1659340

Summary: cfme shows deleted rhv41 vms as orphaned instead of archived
Product: Red Hat CloudForms Management Engine Reporter: Ganesh Hubale <ghubale>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED CURRENTRELEASE QA Contact: Ganesh Hubale <ghubale>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.6CC: agrare, anikifor, bmidwood, bodnopoz, dmetzger, ghubale, hkataria, jfrey, jhardy, kbrock, lavenel, mfeifer, mperina, mpovolny, obarenbo, simaishi, smallamp
Target Milestone: GAKeywords: Regression, TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1664470 (view as bug list) Environment:
Last Closed: 2019-02-12 16:52:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1664470    

Comment 3 Martin Perina 2018-12-19 08:11:11 UTC
Title mentioned that this was reproduced with CFME 5.10 and RHV 4.1, but 5.10 should be used only with RHV 4.2 (we have never tested 4.1). Could you please try to reproduce with 5.10 and RHV 4.2?

Comment 16 Keenan Brock 2019-01-02 18:35:27 UTC
This Bug confuses me,

Reading David H's message, the orphan vs archive is working as designed.
It is also the first thing I checked when looking through this BZ.

If the vm is still assigned a storage, it is classified as orphaned, if not, it is classified as archived.

So apparently, when the vm disappears, the storage association is not removed from the vm.

So if you want it to be classified as archived, the storages_vms_and_templates records will need to be deleted.
If the storage has been deleted, then fixing this seems straight forward.
If the storage still exist, I'm not sure how we know to remove the associated storage. That seems to go against the way this typically works.

Comment 26 Adam Grare 2019-01-04 15:32:47 UTC
https://github.com/ManageIQ/manageiq/pull/18330

Comment 30 Ganesh Hubale 2019-01-11 07:00:59 UTC
I am not able to get rhv42 environment. hence not tested this BZ with rhv42.
Once I get rhv42 environment, I will test and report BZ If I find any issue.
So I am verifying this BZ.
Thank you.

Comment 31 Angelina Vasileva 2019-01-11 09:01:56 UTC
I confirm this works for 5.10.0.31.20190108221820_a0968c8 and rhv42.