Bug 1718858 - [v2v] It is possible to run a migration plan again via rest api
Summary: [v2v] It is possible to run a migration plan again via rest api
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: unspecified
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: GA
: 5.11.0
Assignee: Fabien Dupont
QA Contact: Ilanit Stein
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-06-10 12:33 UTC by Ilanit Stein
Modified: 2019-12-12 13:36 UTC (History)
4 users (show)

Fixed In Version: 5.11.0.18
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-12-12 13:36:36 UTC
Category: Bug
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:4199 0 None None None 2019-12-12 13:36:48 UTC

Description Ilanit Stein 2019-06-10 12:33:43 UTC
Description of problem:
It is possible to run again a migration plan, that already ended successfully,
via Rest api. In such case, the migration plan will run endlessly, with no progress.

Version-Release number of selected component (if applicable):
CFME-5.10.5.1

Expected results:
Such operation seem to be blocked, with an error.

Comment 2 Fabien Dupont 2019-08-01 15:16:49 UTC
https://github.com/ManageIQ/manageiq/pull/19087

Comment 3 CFME Bot 2019-08-02 16:01:02 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/f505efc2ebb4ea72aa008feee4d998d1f29bbbf2
commit f505efc2ebb4ea72aa008feee4d998d1f29bbbf2
Author:     Adam Grare <agrare>
AuthorDate: Fri Aug  2 06:32:55 2019 -0400
Commit:     Adam Grare <agrare>
CommitDate: Fri Aug  2 06:32:55 2019 -0400

    Merge pull request #19087 from fdupont-redhat/v2v_dont_allow_ordering_finished_plan

    [V2V] Prevent a finished transformation plan from starting

    (cherry picked from commit 29aa3b6b26d1e42cb51006a67cd1c1313a7f75fc)

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

 app/models/service_template_transformation_plan.rb | 3 +-
 spec/models/service_template_transformation_plan_spec.rb | 23 +-
 2 files changed, 18 insertions(+), 8 deletions(-)

Comment 4 Ilanit Stein 2019-08-11 15:19:36 UTC
Verified on CFME-5.11.0.18 + additions [1], [2] (bellow), RHV-4.3.5:

When tried to order a completed successful migration plan, it failed, as expected:
"json": {"error": {"kind": "bad_request", "klass": "Api::BadRequestError", "message": "Service Template id:2 name:'test' cannot be ordered"}}, "msg": "Status code was 400 and not [200]: HTTP Error 400: Bad Request"

[1] To allow conversion host enable, uUsed work around mentioned in this bug description:
Bug 1738643 - [v2v][Regression] Can not add conversion host due to playbook errors
[2] To allow successful migration, used libguestfs special packages:
libguestfs libguestfs-tools-c virt-v2v python-libguestfs
of version: 1.40.2-5.el7.1.bz1680361.v3.1.x86_64, generated by rjones.

Comment 6 errata-xmlrpc 2019-12-12 13:36:36 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-2019:4199


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