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.
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.
I can confirm that VM Create Complete does what is expected but ultimately I would like to leave that choice to PM.
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)
Bug test automated in https://github.com/RedHatQE/cfme_tests/pull/2079 Test cfme/tests/control/test_bugs.py:test_folder_field_scope
John, I think you need to weigh in on how to proceed with this one.
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.
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 ***
*** Bug 1290186 has been marked as a duplicate of this bug. ***