Bug 1448023 - CFME reports VM migration passed when it fails on RHV side
Summary: CFME reports VM migration passed when it fails on RHV side
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Piotr Kliczewski
QA Contact: Angelina Vasileva
URL:
Whiteboard: vm:migrate:rhev
Depends On:
Blocks: 1478518 1533280
TreeView+ depends on / blocked
 
Reported: 2017-05-04 12:07 UTC by movciari
Modified: 2019-05-31 14:00 UTC (History)
8 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1478518 1533280 (view as bug list)
Environment:
Last Closed: 2018-06-21 20:47:21 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ManageIQ manageiq-providers-ovirt pull 182 0 None None None 2017-12-22 13:00:32 UTC

Description movciari 2017-05-04 12:07:40 UTC
Description of problem:
When you try to use live migration of VM to another RHV host, and it fails on RHV side, CFME reports migration succeeded

Version-Release number of selected component (if applicable):
5.8.0.12-rc1

How reproducible:
always

Steps to Reproduce:
1. Get an RHV environment where you can try to migrate VM, and it will fail
2. Try to migrate a VM using CFME, wait for the request to complete
3. Check events in RHV to see the migration actually failed

Actual results:
CFME reports migration succeeded

Expected results:
CFME should report that migration failed

Additional info:

Comment 2 Oved Ourfali 2017-05-05 03:56:36 UTC
Tomas, can you please take a look?

Comment 3 Tomas Jelinek 2017-05-05 14:46:00 UTC
The reason is that the the migration is only called and there is no monitoring of the task. So it returns as migration succeeded if the call succeeded and fail if it fails.

This actually handles most of the cases since the migration typically fails on validation right at the beginning (e.g. the VM can not be migrated for some reason).

The less common case that the migration is initiated successfully but during running it fails is not handled.

Will have a look how hard would it be to introduce the monitoring of the migration.

Comment 4 Oved Ourfali 2017-06-21 06:32:37 UTC
William - will that get into 5.8.1?

Comment 6 William Fitzgerald 2017-06-23 16:47:49 UTC
Oved - I added a fine/yes label to the PR so it should be backported to 5.8.1

Comment 7 CFME Bot 2017-06-23 18:53:28 UTC
New commit detected on ManageIQ/manageiq-content/master:
https://github.com/ManageIQ/manageiq-content/commit/77b0ba7edc745324eca9507bb2cdd6764921a9cf

commit 77b0ba7edc745324eca9507bb2cdd6764921a9cf
Author:     william fitzgerald <wfitzger>
AuthorDate: Fri Jun 23 12:24:39 2017 -0400
Commit:     william fitzgerald <wfitzger>
CommitDate: Fri Jun 23 14:11:06 2017 -0400

    Updated vm migration to report when an error occurs.
    
    Updated checkmigration method to raise an error.
    Refactored method to new style and create new spec tests.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448023

 .../Methods.class/__methods__/checkmigration.rb    | 68 ++++++++++++-----
 .../__methods__/checkmigration_spec.rb             | 88 ++++++++++++++++++++++
 2 files changed, 139 insertions(+), 17 deletions(-)
 create mode 100644 spec/content/automate/ManageIQ/Infrastructure/VM/Migrate/StateMachines/Methods.class/__methods__/checkmigration_spec.rb

Comment 9 William Fitzgerald 2017-06-23 21:38:13 UTC
ok, thanks

Comment 12 CFME Bot 2017-12-21 14:36:51 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/377f42225ef7a50a2ed00af6a4e6097b4c3742bf

commit 377f42225ef7a50a2ed00af6a4e6097b4c3742bf
Author:     Bill Wei <bilwei>
AuthorDate: Wed Dec 20 15:43:32 2017 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Thu Dec 21 09:03:45 2017 -0500

    Rescue migration error and update status
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1448023

 app/models/vm_migrate_task.rb       | 14 ++++++++++----
 spec/models/vm_migrate_task_spec.rb | 18 ++++++++++++++++++
 2 files changed, 28 insertions(+), 4 deletions(-)
 create mode 100644 spec/models/vm_migrate_task_spec.rb

Comment 14 CFME Bot 2018-01-10 14:08:28 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
https://github.com/ManageIQ/manageiq-providers-ovirt/commit/a27a3a15d2045db45ed99f4bc82aaf0fabc5c41d

commit a27a3a15d2045db45ed99f4bc82aaf0fabc5c41d
Author:     Piotr Kliczewski <piotr.kliczewski>
AuthorDate: Fri Dec 22 13:29:21 2017 +0100
Commit:     Piotr Kliczewski <piotr.kliczewski>
CommitDate: Wed Jan 10 13:37:18 2018 +0100

    Block migration call
    
    We need to align migration call semantic with vmware. We want to block
    the call and return with success or raise an error.
    
    Fixes https://bugzilla.redhat.com/1448023

 .../manageiq/providers/redhat/infra_manager.rb     | 18 +++++++++++++-
 .../providers/redhat/infra_manager_spec.rb         | 29 ++++++++++++++++++++++
 2 files changed, 46 insertions(+), 1 deletion(-)


Note You need to log in before you can comment on or make changes to this bug.