Description of problem: Prior to CFME 5.5 we could define an Alert to send a Management Event, give the Event a name, and then create the correspondingly named Instance under /System/Event and all would run happily. Now with CFME 5.5 we have the Event Switchboard Namespaces under /System/Event, i.e. EmsEvent, MiqEvent and RequestEvent. I tried creating a test alert called 'test' that sends a Management Event called 'test', to see in the log where it was searching in the event switchboard. The error I saw was unexpected though: Event test for class [ManageIQ::Providers::Redhat::InfraManager::Vm] id [1000000000024] was not raised: test is not defined in MiqEventDefinition It seems we can no longer create user-defined Management Events. I would consider this a regression on CFME 5.4. Version-Release number of selected component (if applicable): CFME 5.5 How reproducible: Every time Steps to Reproduce: 1. Create a Control Alert that sends a user-defined Management Event called 'test' 2. Assign the Alert to an Alert profile, and trigger the action that would generate the alert. Actual results: Observe the error: Event test for class [ManageIQ::Providers::Redhat::InfraManager::Vm] id [1000000000024] was not raised: test is not defined in MiqEventDefinition Expected results: The Management Event should be run Additional info:
https://github.com/ManageIQ/manageiq/pull/6156
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/6dfab2e00364d92356c3e0da2aa8e6653f786948 commit 6dfab2e00364d92356c3e0da2aa8e6653f786948 Author: Lucy Fu <lufu> AuthorDate: Mon Jan 11 09:50:43 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Jan 12 14:19:46 2016 -0500 Add new EventStream subclass CustomEvent for Management Event from Alert. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 app/models/custom_event.rb | 2 ++ .../service_models/miq_ae_service_custom_event.rb | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 app/models/custom_event.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_custom_event.rb
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/d96a7bc350ee350fbee3be8ce25e3d14a9081996 commit d96a7bc350ee350fbee3be8ce25e3d14a9081996 Author: Lucy Fu <lufu> AuthorDate: Mon Jan 11 10:00:27 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Jan 12 14:19:46 2016 -0500 Create a CustomEvent and pass it to automate. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 app/models/miq_alert.rb | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/3b213cd6509e8346d38dd7d496b0ff5e569c1702 commit 3b213cd6509e8346d38dd7d496b0ff5e569c1702 Author: Lucy Fu <lufu> AuthorDate: Tue Jan 12 09:24:00 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Jan 12 14:19:46 2016 -0500 Add test cases for alert that sends a Management Event. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 spec/models/miq_alert_spec.rb | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/02c7f521b47a4a59d03377acc29945ef5e135f67 commit 02c7f521b47a4a59d03377acc29945ef5e135f67 Author: Lucy Fu <lufu> AuthorDate: Mon Jan 11 11:13:34 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Jan 12 14:19:46 2016 -0500 Alert for events if possible. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 app/models/miq_event.rb | 2 ++ 1 file changed, 2 insertions(+)
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/f6c840b64d8f51e3442221928e0e664c54e4757d commit f6c840b64d8f51e3442221928e0e664c54e4757d Author: Lucy Fu <lufu> AuthorDate: Tue Jan 12 13:11:48 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Jan 12 14:19:46 2016 -0500 Add /System/Event/CustomEvent/Alert in automate. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 .../Event/CustomEvent/Alert.class/__class__.yaml | 433 +++++++++++++++++++++ .../System/Event/CustomEvent/__namespace__.yaml | 11 + 2 files changed, 444 insertions(+) create mode 100644 db/fixtures/ae_datastore/ManageIQ/System/Event/CustomEvent/Alert.class/__class__.yaml create mode 100644 db/fixtures/ae_datastore/ManageIQ/System/Event/CustomEvent/__namespace__.yaml
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4658374e37a4a04d622e5e554acfb79e840d1bd5 commit 4658374e37a4a04d622e5e554acfb79e840d1bd5 Author: Lucy Fu <lufu> AuthorDate: Tue Jan 12 09:24:00 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Feb 9 14:01:05 2016 -0500 Add test cases for alert that sends a Management Event. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 spec/models/miq_alert_spec.rb | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+)
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d6884519c12e945a724334d68d7f3d6976adbc4a commit d6884519c12e945a724334d68d7f3d6976adbc4a Author: Lucy Fu <lufu> AuthorDate: Tue Jan 12 13:11:48 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Feb 9 14:01:05 2016 -0500 Add /System/Event/CustomEvent/Alert in automate. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 .../Event/CustomEvent/Alert.class/__class__.yaml | 433 +++++++++++++++++++++ .../System/Event/CustomEvent/__namespace__.yaml | 11 + 2 files changed, 444 insertions(+) create mode 100644 db/fixtures/ae_datastore/ManageIQ/System/Event/CustomEvent/Alert.class/__class__.yaml create mode 100644 db/fixtures/ae_datastore/ManageIQ/System/Event/CustomEvent/__namespace__.yaml
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c82f5a1b06e7acdfaa9bcc89651729cf4579b668 commit c82f5a1b06e7acdfaa9bcc89651729cf4579b668 Author: Lucy Fu <lufu> AuthorDate: Mon Jan 11 11:13:34 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Feb 9 14:01:04 2016 -0500 Alert for events if possible. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 app/models/miq_event.rb | 2 ++ 1 file changed, 2 insertions(+)
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=452a1114c4b6507d7450677a72b3142becf32870 commit 452a1114c4b6507d7450677a72b3142becf32870 Author: Lucy Fu <lufu> AuthorDate: Mon Jan 11 10:00:27 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Feb 9 14:01:04 2016 -0500 Create a CustomEvent and pass it to automate. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 app/models/miq_alert.rb | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-)
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=6dd2e90b9d55fb2356dd5157a6113798b097ccf4 commit 6dd2e90b9d55fb2356dd5157a6113798b097ccf4 Author: Lucy Fu <lufu> AuthorDate: Mon Jan 11 09:50:43 2016 -0500 Commit: Lucy Fu <lufu> CommitDate: Tue Feb 9 14:01:04 2016 -0500 Add new EventStream subclass CustomEvent for Management Event from Alert. https://bugzilla.redhat.com/show_bug.cgi?id=1296248 app/models/custom_event.rb | 2 ++ .../service_models/miq_ae_service_custom_event.rb | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 app/models/custom_event.rb create mode 100644 lib/miq_automation_engine/service_models/miq_ae_service_custom_event.rb
https://github.com/ManageIQ/manageiq/pull/6577
Detected commit referencing this ticket while ticket status is MODIFIED.
*** Bug 1315411 has been marked as a duplicate of this bug. ***
Verified fixed in 5.6.0.4-beta2.3.20160421172650_719e256. My steps to reproduce: 1. Go to Control->Explorer->Alerts 2. Make an alert called "test": Based On: VM and Instance What to Evaluate: Nothing Driving Event: VM Operation: VM Reset Notification Frequency: 1 Minute Send Management Event Event Name: test_alert_management_event 3. Go to Automate->Explorer 4. Make a custom domain with a tree: Test - Domain System - Namespace Event - Namespace CustomEvent - Namespace Management Event (Alert) - Class test_alert_management_event - Instance 5. Create "VM and Instance" alert profile called "test_alert_profile". 6. Assign the "test" alert to "test_alert_profile". 7. Assign "test_alert_profile" to "Selected Infrastructure Providers". 8. Reset any virtual machine which is located in the selected provider. In automation log you can observe "test_alert_management_event" event invocation. There is no more error "Event "test_alert_management_event" for class was not raised".
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