Bug 1468201

Summary: A deleted VM state do not change to Archived state
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: ProvidersAssignee: Piotr Kliczewski <pkliczew>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Zmeskal <jzmeskal>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8.0CC: gblomqui, greartes, jfrey, jhardy, jzmeskal, mgoldboi, obarenbo, simaishi
Target Milestone: GAKeywords: Regression, TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhev:vm state
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1479481 (view as bug list) Environment:
Last Closed: 2018-03-06 14:45:35 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: 1479481    
Attachments:
Description Flags
evm.log
none
automation.log none

Description Ilanit Stein 2017-07-06 09:50:06 UTC
Description of problem:

A down VM that is deleted on RHV provider side, move into Unknown state on CFME side, and keeps this state, while it should move into Archived state.
This is even though the VM was refreshed, and long time passed (20 min so far).

Version-Release number of selected component (if applicable):
CFME-5.8.1/RHV-4.1.3

Additional info:
On CFME, under Archived VMs, there are VMs in Archived state, but those are VMs taken from DB history records.

Comment 2 Ilanit Stein 2017-07-06 10:17:40 UTC
Created attachment 1294908 [details]
evm.log

Comment 3 Ilanit Stein 2017-07-06 10:18:20 UTC
Created attachment 1294909 [details]
automation.log

Comment 4 Ilanit Stein 2017-07-06 11:42:26 UTC
There is a difference in regards to VMs, that were deleted on provider side,
between VMWare and RHV.

For VMWare (VSphere55), 
such VMs will be displayed only under "Archived",
and it In the VM details page, the power state is "Unknown".

While for RHV,
such VMs are keep on being displayed under provider VMs, with power state: "Unknown",
but they are not displayed under the Archived VMs

Comment 5 Piotr Kliczewski 2017-07-13 12:01:40 UTC
I found and issue with vm UPDATE statement. After playing with bunch of different solutions I noticed that the problem is gone with the latest master. I am trying to understand what has changed to make sure the fix was back ported.

Comment 8 Jan Zmeskal 2017-11-09 16:43:35 UTC
Verified on:
CFME 5.9.0.4
RHV 4.1.7.4

Verification steps:
1. Have powered-down VM in RHV provider
2. Make sure it is under the provider in CFME
3. Remove it on RHV side
4. Refresh relationships and power states in CFME for RHV provider
5. Check that the VM in question is archived (it is no longer directly under provider and power state is unknown)