Description of problem: vm discovery event doe not drive the custom action to apply tag if vm discovery event is replaced with vm power on or vm power off the custom action is executed and tag is applied. Policy is applied at the ems level. Control policy only consist of vm discovery and custom action to apply tag. The scope of condition is not configured in the vm control policy. Version-Release number of selected component (if applicable): 5.4.0.5 How reproducible: very Steps to Reproduce: 1. create vm control policy with event "vm discovery" action type "tag" out of the box tag "Environment: Development" 2. create new vm in ems environment 3. refresh the ems and wait for the vm to be discovered 4. policy is scoped but tag is not applied. 5. wait a few mins, switch the event "vm discovery" to "vm power on" and power vm on. 6. vm is now tagged Actual results: vm discovery not triggering action Expected results: Additional info:
Milan, can you make sure we have a test around this please.
I think the method you want to use is vm_create (VM Create Complete). At the moment the vm_discover event is only tied to two RHEV-M events. USER_ADD_VM: - policy: - src_vm - vm_discover - refresh: - src_ems_cluster ... USER_ADD_VM_TEMPLATE_FINISHED_FAILURE: - policy: - src_vm - vm_discover
Per our analysis, we should remove VM Discovery (type vm_discover) from the UI as a selection candidate for VM control policy. The summary field of this BZ has been updated accordingly.
*** Bug 1209538 has been marked as a duplicate of this bug. ***
https://github.com/ManageIQ/manageiq/pull/5970
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/713960fa36a113293c79d8878f9f0e031aaaceeb commit 713960fa36a113293c79d8878f9f0e031aaaceeb Author: Bill Wei <bilwei> AuthorDate: Tue Dec 22 16:55:50 2015 -0500 Commit: Bill Wei <bilwei> CommitDate: Mon Jan 4 16:56:48 2016 -0500 Remove vm_discover event definition https://bugzilla.redhat.com/show_bug.cgi?id=1238371 .../Event/EmsEvent/RHEVM.class/user_add_vm.yaml | 2 -- .../user_add_vm_template_finished_failure.yaml | 12 ----------- db/fixtures/miq_event_definitions.csv | 1 - ...e_vm_discover_row_from_miq_event_definitions.rb | 18 ++++++++++++++++ ...discover_row_from_miq_event_definitions_spec.rb | 25 ++++++++++++++++++++++ 5 files changed, 43 insertions(+), 15 deletions(-) delete mode 100644 db/fixtures/ae_datastore/ManageIQ/System/Event/EmsEvent/RHEVM.class/user_add_vm_template_finished_failure.yaml create mode 100644 db/migrate/20151222152212_remove_vm_discover_row_from_miq_event_definitions.rb create mode 100644 spec/migrations/20151222152212_remove_vm_discover_row_from_miq_event_definitions_spec.rb
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://access.redhat.com/errata/RHBA-2016:1348