Bug 1590430

Summary: [RFE] Create a built-in policy to prevent source VM from starting if transformation is complete.
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED ERRATA QA Contact: Dmitry Misharov <dmisharo>
Severity: low Docs Contact:
Priority: unspecified    
Version: 5.9.0CC: dmisharo, gmccullo, obarenbo
Target Milestone: GAKeywords: FutureFeature, ZStream
Target Release: 5.9.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.3.2 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1565199 Environment:
Last Closed: 2018-07-12 13:16:01 UTC Type: ---
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: 1565199, 1593202    
Bug Blocks:    

Comment 2 CFME Bot 2018-06-12 15:09:41 UTC
New commit detected on ManageIQ/manageiq-automation_engine/gaprindashvili:

https://github.com/ManageIQ/manageiq-automation_engine/commit/ec1e41d2b5799b604b46e5acafb40ecfc9a77181
commit ec1e41d2b5799b604b46e5acafb40ecfc9a77181
Author:     Greg McCullough <gmccullo>
AuthorDate: Tue Jun 12 08:58:35 2018 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Tue Jun 12 08:58:35 2018 -0400

    Merge pull request #186 from lfu/migrated_policy_1565199

    Expose task.mark_vm_migrated to Service.
    (cherry picked from commit 595d81061458eb2a8b6d92f8ebce0dbc35fbbec8)

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

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

Comment 3 CFME Bot 2018-06-12 15:16:23 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/0fc4d711ddbb90cdf31e6304cc597230ac9fbb69
commit 0fc4d711ddbb90cdf31e6304cc597230ac9fbb69
Author:     Greg McCullough <gmccullo>
AuthorDate: Tue Jun 12 08:57:52 2018 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Tue Jun 12 08:57:52 2018 -0400

    Merge pull request #17389 from lfu/migrated_policy_1565199

    Add built in policy to prevent transformed VM from starting.
    (cherry picked from commit 2252542b171a135ab370977b7e0379abde4503c6)

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

 app/models/service_template_transformation_plan_task.rb | 4 +
 db/fixtures/classifications.yml | 17 +
 product/policy/built_in_policies.yml | 13 +
 spec/models/service_template_transformation_plan_task_spec.rb | 7 +
 4 files changed, 41 insertions(+)

Comment 4 CFME Bot 2018-06-12 15:18:52 UTC
New commit detected on ManageIQ/manageiq-content/gaprindashvili:

https://github.com/ManageIQ/manageiq-content/commit/9065f2754cb1b97a12709ce2624b0bec5dd5d29a
commit 9065f2754cb1b97a12709ce2624b0bec5dd5d29a
Author:     Greg McCullough <gmccullo>
AuthorDate: Tue Jun 12 08:59:12 2018 -0400
Commit:     Greg McCullough <gmccullo>
CommitDate: Tue Jun 12 08:59:12 2018 -0400

    Merge pull request #324 from lfu/migrated_policy_1565199

    Tag migrated VM.
    (cherry picked from commit d7d3f5d13e8326c9b2ceab1f59df5de58130d903)

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

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

Comment 7 Dmitry Misharov 2018-06-25 10:06:05 UTC
Blocked to verify due https://bugzilla.redhat.com/show_bug.cgi?id=1593202

Comment 8 Dmitry Misharov 2018-06-28 12:43:14 UTC
Verified in 5.9.3.3.20180627151410_682cecf. Builtin policy works as expected, original vm doesn't start after migration.

Comment 10 errata-xmlrpc 2018-07-12 13:16:01 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/RHSA-2018:2184