Bug 1207788

Summary: "VM Power off" event is called instead of "VM Power Off Request" when powering off an vm from CFME
Product: Red Hat CloudForms Management Engine Reporter: Ramesh A <rananda>
Component: ControlAssignee: Bill Wei <bilwei>
Status: CLOSED ERRATA QA Contact: Ievgen Zapolskyi <izapolsk>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: dajohnso, jhardy, mfalesni, mfeifer, obarenbo
Target Milestone: GAFlags: izapolsk: automate_bug-
Target Release: 5.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-06-16 12:56:24 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:

Description Ramesh A 2015-03-31 17:17:48 UTC
Description of problem:
"VM Power off" event is called instead of "VM Power Off Request" when powering off an vm from CFME

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

How reproducible:
100%

Steps to Reproduce:
1. Navigate to Infrastructure ==> Virtual Machine ==> Select an vm and click on it
2. In vm details page, Click on the Power off button
3. Check for the policy.log file entry

Actual results:
"VM Power off" event is triggered.
Refer the policy.log file for further information

Expected results:
"VM Power Off Request" event should be triggered

Additional info:
policy.log:
===========
[----] I, [2015-03-31T12:56:58.948325 #2244:aabea0]  INFO -- : MIQ(policy-enforce_policy): Event: [vm_poweroff], To: [ramesh-540011]

Comment 2 Greg McCullough 2015-03-31 17:46:51 UTC
Bill - I do not see where in the code vm_poweroff ever gets passed to enforce_policy directly.  Would be useful to recreate and inject a stack dump into the enforce_policy method.

Comment 3 CFME Bot 2015-04-07 15:06:01 UTC
New commit detected on manageiq/master:
https://github.com/ManageIQ/manageiq/commit/1614100e26393ba53e59a2a0613257feb6d92645

commit 1614100e26393ba53e59a2a0613257feb6d92645
Author:     Bill Wei <bilwei>
AuthorDate: Mon Apr 6 17:18:28 2015 -0400
Commit:     Bill Wei <bilwei>
CommitDate: Mon Apr 6 17:18:28 2015 -0400

    Correct event name from request_vm_stop to request_vm_poweroff
    
    request_vm_stop is not a valid event name
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1207788

 vmdb/app/models/vm_or_template/operations/power.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 5 Ramesh A 2015-04-24 19:10:07 UTC
Good to go.  Verified and working fine in 5.4.0.0.22.20150420163946_26004d1.

Comment 7 errata-xmlrpc 2015-06-16 12:56:24 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://rhn.redhat.com/errata/RHBA-2015-1100.html