Bug 1238371 - Remove vm discovery as an event type
Summary: Remove vm discovery as an event type
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Control
Version: 5.4.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.6.0
Assignee: Bill Wei
QA Contact: Jiri Stefanisin
URL:
Whiteboard: control:policy:event:action
: 1209538 (view as bug list)
Depends On:
Blocks: 1290186 1293737
TreeView+ depends on / blocked
 
Reported: 2015-07-01 18:16 UTC by Josh Carter
Modified: 2019-10-10 09:54 UTC (History)
9 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1293737 (view as bug list)
Environment:
Last Closed: 2016-06-29 14:57: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 Troubleshoot None Cloudforms 3.1 no longer detects vmware machines through vm discovery after updating from EVM4 2019-05-20 11:42:06 UTC
Red Hat Knowledge Base (Solution) 2194411 0 None None None 2016-03-09 20:08:26 UTC
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Josh Carter 2015-07-01 18:16:03 UTC
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:

Comment 2 Dave Johnson 2015-07-02 19:20:09 UTC
Milan, can you make sure we have a test around this please.

Comment 3 Greg McCullough 2015-07-02 21:58:32 UTC
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

Comment 5 Bill Wei 2015-12-22 22:02:30 UTC
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.

Comment 6 Bill Wei 2015-12-22 22:06:50 UTC
*** Bug 1209538 has been marked as a duplicate of this bug. ***

Comment 8 CFME Bot 2016-01-05 14:41:08 UTC
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

Comment 11 errata-xmlrpc 2016-06-29 14:57:50 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://access.redhat.com/errata/RHBA-2016:1348


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