Bug 1565199

Summary: [RFE] Create a built-in policy to prevent source VM from starting if transformation is complete.
Product: Red Hat CloudForms Management Engine Reporter: Fabien Dupont <fdupont>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED CURRENTRELEASE QA Contact: Dmitry Misharov <dmisharo>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.9.0CC: dmisharo, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature, TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1590430 (view as bug list) Environment:
Last Closed: 2019-02-11 14:09:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1590430    

Description Fabien Dupont 2018-04-09 15:17:54 UTC
When a virtual machine has been transformed from VMware to RHV, we want to prevent the original virtual machine from starting, in order to avoid conflict between source and destination VM. A control policy could implement that.

Comment 5 CFME Bot 2018-06-12 13:01:44 UTC
New commits detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/75b03cb810056add77e261c309b5ef2f4bdb9f16
commit 75b03cb810056add77e261c309b5ef2f4bdb9f16
Author:     Lucy Fu <lufu>
AuthorDate: Wed Jun  6 09:02:27 2018 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Wed Jun  6 09:02:27 2018 -0400

    Add new tag category and entry /transformation_status/migrated.

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

 db/fixtures/classifications.yml | 17 +
 1 file changed, 17 insertions(+)


https://github.com/ManageIQ/manageiq/commit/7a46dd2e9fde7c611fc6641143d035da06160f1d
commit 7a46dd2e9fde7c611fc6641143d035da06160f1d
Author:     Lucy Fu <lufu>
AuthorDate: Mon May  7 13:53:35 2018 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Mon May  7 13:53:35 2018 -0400

    Add built in policy to prevent transformed VM from starting.

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

 app/models/service_template_transformation_plan_task.rb | 4 +
 product/policy/built_in_policies.yml | 13 +
 spec/models/service_template_transformation_plan_task_spec.rb | 7 +
 3 files changed, 24 insertions(+)

Comment 6 CFME Bot 2018-06-12 13:03:25 UTC
New commit detected on ManageIQ/manageiq-content/master:

https://github.com/ManageIQ/manageiq-content/commit/79dfbbe7d863e0c078522ca71e367cfa7bf34e9f
commit 79dfbbe7d863e0c078522ca71e367cfa7bf34e9f
Author:     Lucy Fu <lufu>
AuthorDate: Wed Jun  6 09:03:27 2018 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Wed Jun  6 09:03:27 2018 -0400

    Tag migrated VM.

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

 content/automate/ManageIQ/Transformation/Infrastructure/VM/vmwarews.class/__methods__/setmigrated.rb | 8 +-
 1 file changed, 6 insertions(+), 2 deletions(-)

Comment 7 CFME Bot 2018-06-12 13:05:01 UTC
New commit detected on ManageIQ/manageiq-automation_engine/master:

https://github.com/ManageIQ/manageiq-automation_engine/commit/79f36c8f133d583aeb38f821d788a0b0f4eca265
commit 79f36c8f133d583aeb38f821d788a0b0f4eca265
Author:     Lucy Fu <lufu>
AuthorDate: Wed Jun  6 12:39:51 2018 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Wed Jun  6 12:39:51 2018 -0400

    Expose task.mark_vm_migrated to Service.

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

 lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_task.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 9 Dmitry Misharov 2018-07-19 08:41:06 UTC
Verified in 5.10.0.4.20180712211305_e6e4542. Builtin policy works as expected, original vm doesn't start after migration.