Bug 1702018

Summary: Unable to use the "prevent current event from proceeding" action on a "VM Retire Request" event
Product: Red Hat CloudForms Management Engine Reporter: John Dupuy <jdupuy>
Component: ControlAssignee: Lucy Fu <lufu>
Status: CLOSED EOL 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, TestOnly, ZStream
Target Release: 5.12.0Flags: mfeifer: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Release Note
Doc Text:
Story Points: ---
Clone Of:
: 1783360 1783361 (view as bug list) Environment:
Last Closed: 2020-03-25 18:03:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1783360, 1783361    
Attachments:
Description Flags
VM Control Policy Details none

Description John Dupuy 2019-04-22 18:05:09 UTC
Created attachment 1557244 [details]
VM Control Policy Details

Description of problem:
Creating a policy that contains the event "VM Retire Request" and/or "VM Retired", with the action "Prevent current event from proceeding" does not prevent VM retirement.  

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

How reproducible:
100%

Steps to Reproduce:
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

Actual results:
The VM is retired

Expected results:
The policy should prevent the VM from being retired

Additional info:
This is blocking an automated test.

Comment 3 William Fitzgerald 2019-04-23 14:18:05 UTC
Is there a reprodcer ?

Comment 5 William Fitzgerald 2019-04-23 20:16:37 UTC
I was able to reproduce the problem on 5.10.0.33 and 5.10.3.3.

It does work correctly in 5.9.9.1

Comment 8 Tina Fitzgerald 2019-07-15 21:04:23 UTC
Hi Lucy,

Can we discuss when you have time?

Thanks,
Tina

Comment 11 John Dupuy 2019-07-29 19:12:06 UTC
This BZ is also affecting 5.11 streams

Comment 12 CFME Bot 2019-08-14 21:57:00 UTC
New commit detected on ManageIQ/manageiq-content/master:

https://github.com/ManageIQ/manageiq-content/commit/b910330a3a550b5a791e536783829a03c6e702bf
commit b910330a3a550b5a791e536783829a03c6e702bf
Author:     Lucy Fu <lufu>
AuthorDate: Thu Jul 25 17:29:31 2019 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Thu Jul 25 17:29:31 2019 -0400

    Vm retirement is processed by VmRetireRequest state machine.

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

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

Comment 13 CFME Bot 2019-08-19 16:56:01 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/710fecf2a6835376f19101873319ed324860a7b1
commit 710fecf2a6835376f19101873319ed324860a7b1
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=1702018

 app/models/vm_or_template.rb | 19 +
 spec/models/vm/retirement_management_spec.rb | 67 +-
 2 files changed, 76 insertions(+), 10 deletions(-)