Bug 1467866

Summary: [v2v] automation request status is not updated at all
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: ProvidersAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, gblomqui, jfrey, jhardy, nsimsolo, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhev, v2v
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1469226 (view as bug list) Environment:
Last Closed: 2018-03-06 14:34:21 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: 1469226    
Attachments:
Description Flags
production.log
none
automation.log
none
evm.log
none
engine.log none

Description Ilanit Stein 2017-07-05 11:24:59 UTC
Description of problem:
CFME: When running 'Transform this VM to RHV', and go to Automate->Requests,
The request Last message after few minutes turns into:
"[EVM] VM [<VM name on VMware>] Step [WaitForImport] Status [VM Import completed] Message [Checking for VM Import completion] Current Retry Number [1]"
 
It is reporting "Status [VM Import completed]" right from the start!
This same last message appear for hours (with the retry number increasing).

Even if the v2v operation fails immediately,
and even if the v2v operation end up successfully. 

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

How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:
Request status is set to  "[VM Import completed]", only few minutes, after v2v operation is triggered.

Expected results:
Request status should reflect: Error in v2v, the progress stage, in case the v2v operation is indeed progressing 

Additional info:

Comment 2 Ilanit Stein 2017-07-05 11:59:13 UTC
Created attachment 1294554 [details]
production.log

Comment 3 Ilanit Stein 2017-07-05 11:59:47 UTC
Created attachment 1294555 [details]
automation.log

Comment 4 Ilanit Stein 2017-07-05 12:00:10 UTC
Created attachment 1294556 [details]
evm.log

Comment 5 Ilanit Stein 2017-07-05 12:00:36 UTC
Created attachment 1294557 [details]
engine.log

Comment 6 Martin Betak 2017-07-10 11:35:20 UTC
Yes this request to be in the state WaitForImport which has incorrectly set on_exit handler as: update_vm_import_status(status => 'VM Import completed') where it should be in fact "Check for import completed" or such  and not "the whole import has been completed.

This logical error is also present in on_exit handlers in different states in the manageiq-content/content/automate/ManageIQ/Infrastructure/VM/Transform/StateMachines/VmImport.class/__class__.yaml state machine.

Should be a simple textual fix.

Comment 7 Martin Betak 2017-07-10 12:12:55 UTC
Although I admit it is a bit confusing, I don't think this textual inaccuracy should not qualify as *blocker* and could be fixed in next z-stream.

Comment 10 Ilanit Stein 2018-01-01 13:08:57 UTC
Verified on CFME-5.9.0.14/RHV-4.1.8,

When a VM starts to get imported, in the Automate Request a message with 
Status ["Waiting for VM Import completion"]
and not as before (Status ["VM Import completed"]).

Then if import fails, in the Automate Request a message with 
Status [Error encountered during VM import] Message [Checking for VM Import completion]