Bug 1783361

Summary: Unable to use the "prevent current event from proceeding" action on a "VM Retire Request" event
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED ERRATA QA Contact: John Dupuy <jdupuy>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: 5.10.3CC: bmidwood, dmetzger, jdupuy, lufu, obarenbo, tfitzger, wfitzger
Target Milestone: GAKeywords: Regression, ZStream
Target Release: 5.10.14Flags: simaishi: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.14.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1702018 Environment:
Last Closed: 2020-01-21 16:51:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1702018    
Bug Blocks:    

Comment 3 CFME Bot 2019-12-13 16:21:05 UTC
New commit detected on ManageIQ/manageiq-content/hammer:

https://github.com/ManageIQ/manageiq-content/commit/8945d950176efb5086ce4537e512a3f04fb90366
commit 8945d950176efb5086ce4537e512a3f04fb90366
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Wed Aug 14 17:52:01 2019 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Wed Aug 14 17:52:01 2019 -0400

    Merge pull request #552 from lfu/prevent_retirement_1702018

    Vm retirement is processed by VmRetireRequest state machine.

    (cherry picked from commit 3e2fb4beb1c6d214ca62daa65eb9856d6cc69a5c)

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

 content/automate/ManageIQ/System/Event/MiqEvent/POLICY.class/request_vm_retire.yaml | 6 -
 1 file changed, 6 deletions(-)

Comment 5 CFME Bot 2019-12-16 21:45:30 UTC
New commit detected on ManageIQ/manageiq/hammer:

https://github.com/ManageIQ/manageiq/commit/16543b7ac8a5db590f053e4c6d8e326e8e315450
commit 16543b7ac8a5db590f053e4c6d8e326e8e315450
Author:     Lucy Fu <lufu>
AuthorDate: Tue Aug 13 10:07:38 2019 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Tue Aug 13 10:07:38 2019 -0400

    Add policy check to Vm retirement.

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

 app/models/vm_or_template.rb | 19 +
 spec/models/vm/retirement_management_spec.rb | 45 +-
 2 files changed, 57 insertions(+), 7 deletions(-)

Comment 6 John Dupuy 2020-01-09 13:45:13 UTC
Verified in CFME 5.10.14.0.20200107223945_aa73a61

Steps of verification:
1. Add infra provider (I noticed this with VMWare 6.5)
2. Provision a vm on that provider
3. Create a Vm Control policy with settings detailed in the attached image
4. Assign the policy to a profile 
5. Assign the profile to the infra provider
6. Retire the VM via the UI
7. Wait 5-10 min

Verified that the VM was NOT retired after 5-10 min. Therefore the policy and action to prevent the retirement request worked properly.

Comment 8 errata-xmlrpc 2020-01-21 16:51:47 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:0189