Bug 1167365 - Unable to inherit resource pool's parent tags with control policy.
Summary: Unable to inherit resource pool's parent tags with control policy.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Control
Version: 5.3.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.3.3
Assignee: Bill Wei
QA Contact: Dave Johnson
URL:
Whiteboard:
Depends On: 1164386
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-24 14:36 UTC by Bill Wei
Modified: 2019-05-20 11:22 UTC (History)
7 users (show)

Fixed In Version: 5.3.3
Doc Type: Bug Fix
Doc Text:
In the previous version of Cloudforms Management Engine, the tagging inheritance code had a reference to the wrong method. As a result, control policy could not be used for a virtual machine to inherit its resource pool's parent tags. This issue was fixed by changing the code to contain a reference to the valid method name. Tag inheritence for virtual machines now works as expected.
Clone Of: 1164386
Environment:
Last Closed: 2015-02-25 16:11:38 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0261 0 normal SHIPPED_LIVE cfme (5.3.3) bug fix and enhancement update 2015-02-25 21:09:28 UTC

Comment 2 Bill Wei 2014-11-24 16:20:25 UTC
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=be0cea98d2f9e89865a25f4ac2da4264021be718

commit be0cea98d2f9e89865a25f4ac2da4264021be718
Author:     Bill Wei <bilwei>
AuthorDate: Fri Nov 21 14:58:50 2014 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Mon Nov 24 09:39:43 2014 -0500

    Fix inheriting tags from resource pool
    
    Reference to a valid method name
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1164386

 vmdb/app/controllers/miq_policy_controller/miq_actions.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 3 John Prause 2015-01-19 15:16:21 UTC
This fix had the flag cfme-5.4

It should have been cfme-5.3.z since this fix came into the 5.3.2 release that has already shipped.

I have changed the flag.

Comment 4 Bill Wei 2015-01-19 16:21:15 UTC
Changing release target to 5.3.3, quoted from Debi Rieden:

I think the flag should be 5.3.3, so that it appears in the 5.3.3 advisory
and thus, Dave can test with the 5.3.3 release.

Comment 6 Ramesh A 2015-02-11 18:03:48 UTC
Verification failed.  Verified in 5.3.3.1.20150210145146_14d1c48

Policy evaluation always results in False despite being true.

Verification steps:
===================
1. Created policy profile with the scope as "VM and Instance.Resource Pool.My Company Tags : Environment CONTAINS 'Development'" and action as "tag as development" and associate it with "vm create" event
2. From Infrastructure ==> Resource Pools ==> Assign the tag as "Development" (associating with the Resource pool where the vm will be created)
3. Assign the above created policy profile either to Provider or to the Resource pool
4. From the Provider, Create new vm.

Result:
=======
After creation the policy evaluation always returns false and does not get the tag inherited.  Refer the policy.log file for more information.

PS:
===
Same scenario works correctly for the Datastore.


policy.log
===========
[----] I, [2015-02-11T17:47:22.330471 #2271:89b00c]  INFO -- : MIQ(policy-enforce_policy): Event: [vm_create], To: [ramesh4]
[----] I, [2015-02-11T17:47:22.348919 #2275:11b8810]  INFO -- : MIQ(policy-enforce_policy): Event: [assigned_company_tag], To: [admin-template]
[----] I, [2015-02-11T17:47:22.356110 #2271:89b00c]  INFO -- : MIQ(condition-eval): Name: resource pool validation, Expression evaluation result: [false]
[----] I, [2015-02-11T17:47:22.356317 #2271:89b00c]  INFO -- : MIQ(policy-enforce_policy): Policy [resource pool validation] does not apply, skipping...

Comment 7 Bill Wei 2015-02-16 22:21:35 UTC
Verification steps need updates

1. Create a policy. Do not set the scope. You can still use "vm create" event.
2. Create an action "tag as development" with Action Type "Inherit Parent Tags", Parent Type "Parent Resource Pool", and Categories "Environment"
3. From Infrastructure ==> Resource Pools ==> Assign the tag as "Environment: Development" (associating with the Resource pool where the vm will be created)
4. Assign the above created policy profile either to Provider or to the Resource pool
5. From the Provider, Create new vm.
6. Verify the new vm has tag "Environment: Development"

Comment 8 Ramesh A 2015-02-17 08:34:28 UTC
Good to go.  Verified with above verification step as mentioned by Bill in Comment 7.  Verified in 5.3.3.1.20150210145146_14d1c48.

Comment 10 errata-xmlrpc 2015-02-25 16:11:38 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-0261.html


Note You need to log in before you can comment on or make changes to this bug.