Bug 1209538 - conditions based on the "parent folder path (vm & template)" field for "vm and instances" are not triggered
Summary: conditions based on the "parent folder path (vm & template)" field for "vm an...
Keywords:
Status: CLOSED DUPLICATE of bug 1238371
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Control
Version: 5.3.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.6.0
Assignee: Bill Wei
QA Contact: Dave Johnson
URL:
Whiteboard:
: 1290186 (view as bug list)
Depends On:
Blocks: 1290186
TreeView+ depends on / blocked
 
Reported: 2015-04-07 15:22 UTC by Felix Dewaleyne
Modified: 2019-05-20 11:42 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1290186 (view as bug list)
Environment:
Last Closed: 2015-12-22 22:06:50 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:
mfalesni: automate_bug+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1420843 0 None None None Never

Description Felix Dewaleyne 2015-04-07 15:22:14 UTC
Description of problem:
conditions based on the "parent folder path (vm & template)" field for "vm and instances" are not executed

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

How reproducible:
all the time

Steps to Reproduce:
00. you need to have a vmware environment controlled by CF 3.1 for this (vmware 5.1 confirmed to cause the issue)
01. choose one vm and in its profile from the field "Parent Folder Path (VMs & Templates): " collect the name of one of the folders
02. create a tag to assign
03. create an action to assign the tag,
04. create a policy using for condition "field : vm and instance.Parent Folder Path(vms & templates) INCLUDES " and the string collected.
05. assign the event "vm_discover" to the policy
06. make the action created in step 04 be executed as accept condition for that event
07. assign the policy to a policy profile
08. assign the policy profile to the vmware provider
09. remove the vm used in step 02 from the vmdb
10. refresh the powerstate and relations from the vmware provider

Actual results:
the machine is added back to the vmdb but the tag is not assigned.

Expected results:
the machine is added back to the vmdb and the tag is assigned

Additional info:
- when running a simulation on the vm you should see that the policy should be applied.
- seems to happen regardless of the vmware version and vmdk version (5.1 used in internal reproducer, 5.5 used in customer environment)
- the internal reproducer used the value 'SAT6-DC' for the test.

Comment 6 Bill Wei 2015-04-20 15:14:01 UTC
Felix,

Event VM Discovery is currently not well supported. Please see
https://bugzilla.redhat.com/show_bug.cgi?id=1010425

In your case you can pick event VM Create Complete. Everything works fine. In my test the tag was properly assigned when the VM was added to VMDB.

We may want to remove VM Discover from available selection in the UI.

If this satisfies your need, we can close this ticket. A new ticket could be open to either remove VM discover or fix the event handling.

Comment 7 Felix Dewaleyne 2015-04-20 15:44:44 UTC
I can confirm that VM Create Complete does what is expected but ultimately I would like to leave that choice to PM.

Comment 9 Felix Dewaleyne 2015-04-21 16:27:15 UTC
needinfo : we need to decide if "vm discovery" aas a selectable event should be kept given that it is currently achieved through "vm creation complete" (using a vmware hypervisor)

Comment 10 Milan Falešník 2015-07-08 08:31:11 UTC
Bug test automated in https://github.com/RedHatQE/cfme_tests/pull/2079

Test cfme/tests/control/test_bugs.py:test_folder_field_scope

Comment 11 Dave Johnson 2015-07-20 16:28:46 UTC
John, I think you need to weigh in on how to proceed with this one.

Comment 12 Greg McCullough 2015-12-21 22:53:30 UTC
Bill - The vm_discover event is not properly configured in the system and at this time it should be removed.

As stated above the "VM Create Complete" which is raised from the model when a new VM object is created is the proper event to use.  (Note: It is raised from the model because when the event is issues there is no VM object in the database to raise the event against.)

The vm_discover event is improperly wired to two rhevm events which should also be removed:
USER_ADD_VM_TEMPLATE_FINISHED_FAILURE
USER_ADD_VM

The same issue is reported in bug 1238371.

Comment 13 Bill Wei 2015-12-22 22:06:50 UTC
The work to remove vm_discover event is tracked by bug 1238371. Closing this one

*** This bug has been marked as a duplicate of bug 1238371 ***

Comment 14 Bill Wei 2015-12-22 22:11:01 UTC
*** Bug 1290186 has been marked as a duplicate of this bug. ***


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