Bug 1809035 - Migration cancellation shouldn't be stuck if virt-v2v-wrapper state file doesn't exist
Summary: Migration cancellation shouldn't be stuck if virt-v2v-wrapper state file does...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.11.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: GA
: 5.11.5
Assignee: Fabien Dupont
QA Contact: Md Nadeem
Red Hat CloudForms Documentation
URL:
Whiteboard:
: 1788505 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-02 10:03 UTC by Fabien Dupont
Modified: 2020-05-05 13:43 UTC (History)
4 users (show)

Fixed In Version: 5.11.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-05 13:43:32 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:
pm-rhel: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2020 0 None None None 2020-05-05 13:43:43 UTC

Description Fabien Dupont 2020-03-02 10:03:13 UTC
Description of problem:
Currently, if virt-v2v-wrapper fails before creating its state file, CloudForms will be stuck trying to read the file. If the file collection fails, CloudForms should move on in the cancellation process.

Comment 2 Fabien Dupont 2020-03-02 11:15:43 UTC
https://github.com/ManageIQ/manageiq/pull/19908

Comment 4 Fabien Dupont 2020-03-23 13:17:56 UTC
To test it, the conversion pod has to fail early, e.g. if the pod already exist. A potential flow would be:

1. Create a CloudForms appliance with region 0, say cf1.example.com
2. Configuration the conversion host in cf1.example.com
3. Run a migration on cf1.example.com, the pod will be called conversion-1
4. Create another appliance with region 0, say cf.example.com
5. Configuration the conversion host in cf2.example.com
6. Run a migration on cf2.example.com, the pod can't be created as conversion-1 name already exist

Comment 5 Fabien Dupont 2020-04-10 13:35:50 UTC
*** Bug 1788505 has been marked as a duplicate of this bug. ***

Comment 6 Fabien Dupont 2020-04-13 15:29:48 UTC
Ivanchuk backport PR: https://github.com/ManageIQ/manageiq/pull/20068

Comment 7 CFME Bot 2020-04-13 18:05:20 UTC
New commit detected on ManageIQ/manageiq/jansa:

https://github.com/ManageIQ/manageiq/commit/fcfcd4bb0ef8893804d2a6b6609e8312a6720b66
commit fcfcd4bb0ef8893804d2a6b6609e8312a6720b66
Author:     Adam Grare <agrare>
AuthorDate: Mon Mar  2 12:24:55 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Mon Mar  2 12:24:55 2020 +0000

    Merge pull request #19908 from fdupont-redhat/v2v_bz_1809035

    [V2V] Allow job to continue if kill_virtv2v raises an execption

    (cherry picked from commit cf44de01dfa1dcc1dabcc44ac50170eed7c2a395)

    https://bugzilla.redhat.com/show_bug.cgi?id=1809035

 app/models/infra_conversion_job.rb | 2 +-
 app/models/service_template_transformation_plan_task.rb | 4 +
 spec/models/infra_conversion_job_spec.rb | 16 +-
 spec/models/service_template_transformation_plan_task_spec.rb | 8 +
 4 files changed, 23 insertions(+), 7 deletions(-)

Comment 8 Fabien Dupont 2020-04-16 13:25:48 UTC
In CFME 5.11.4, this could be tested by:

1. Start a migration and wait for the virt-v2v process to be reported
2. Connect to the conversion host, kill virt-v2v-wrapper and remove the state file in a single command: "kill -9 <virt-v2v-wrapper_PID> ; rm -f /tmp/v2v-import...state"

CloudForms will not fail immediately as it supports not to be able to access the state file. Nonetheless, after 5 minutes, it should fail and trigger a cancellation. If you don't want to wait, you can cancel the migration manually.

Comment 12 errata-xmlrpc 2020-05-05 13:43:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2020


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