Bug 1807766

Summary: [UI][v2v] Irrelevant message for a VM that failed Cold migration
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: V2VAssignee: Fabien Dupont <fdupont>
Status: CLOSED WONTFIX QA Contact: Ilanit Stein <istein>
Severity: low Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: low    
Version: 5.11.4CC: bthurber, mturley, vconzola
Target Milestone: GAFlags: vconzola: needinfo-
Target Release: 5.11.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-13 16:52:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: V2V Target Upstream Version:
Embargoed:
Attachments:
Description Flags
failing vm migration screenshot none

Description Ilanit Stein 2020-02-27 08:22:10 UTC
Description of problem:
In CFME-5.11.4, v2v migration failed on bug 1807570,
and next to the migrated VM, there is a message that is not relevant,
because the source VM was down:
"Powering on virtual machine: Migration cancelled"
  
Version-Release number of selected component (if applicable):
CFME-5.11.4
RHV-4.3.7

How reproducible:
100%

Expected results:
There should not be a powering up message for a down source VM.

Additional info:
This message seem to be relevance only for "warm migration" / when source VM is running.

Comment 2 Ilanit Stein 2020-02-27 08:23:39 UTC
Created attachment 1666146 [details]
failing vm migration screenshot

Comment 3 Fabien Dupont 2020-02-27 08:32:08 UTC
The message is about the state where we are the migration state machine. The last state when cancelling is powering on the source VM if it was on.
But you're right, the message should be something like "Restoring VM power state". @Vince, what do you think?

Comment 4 vconzola 2020-03-03 21:55:58 UTC
"Restoring VM power state" makes sense to me, but I don't believe this is something controlled by the UI. @mturley please confirm that we're just passing thru messages generated by the backend.

Comment 5 Mike Turley 2020-03-03 22:09:11 UTC
Vince is correct, in this case the "Powering on virtual machine" message is being displayed because an equivalent message was passed from the backend (task.options.progress.current_description). The "Migration cancelled" piece is appended in the UI based on cancellation status, however.

To be more specific, these status messages are run through a map to try and translate them for i18n (something Milan is working to replace with backend-driven translation). The message map can be found here: https://github.com/ManageIQ/manageiq-v2v/blob/master/app/javascript/react/screens/App/Plan/PlanConstants.js#L22
If the API's task.options.progress.current_description value matches one of the `apiString`s in that map, the corresponding `text` value from the map is used. If not, the API value is used directly. (In this specific case, the API string is "Power on virtual machine", which the map changes to "Powering on virtual machine" in order to keep the grammar consistent.)

So, if we are changing this message we need to do so in the backend, but we should also add any new expected status messages to the map in the UI (until Milan finishes his work to make that map unnecessary).

Comment 6 Fabien Dupont 2020-03-20 20:25:07 UTC
Moving to 5.11.Z. It doesn't have an impact on users and it requires translation.

Comment 7 Fabien Dupont 2020-05-13 16:52:30 UTC
No impact on users. Closing as WONTFIX.