New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MiqAction#action_evm_event should raise MiqEvent instead of EmsEvent. #7041
Conversation
@gmcculloug @gtanzillo Please review. |
@lfu This change definitely makes sense to me. Seems like it was misaligned on EmsEvent all of this time. Do you know if there are other places in the code where there's an expectation that events generated from this action are of type EmsEvent? Maybe timelines? |
025818c
to
8859c54
Compare
@miq-bot remove_label wip |
@gtanzillo The code that expects these events generated from this action are of type EmsEvent are those .yml files under product/alerts/rss. They have been fixed to refer to MiqEvent. |
opts[:ems_cluster_id] = rec.id | ||
opts[:ems_cluster_name] = rec.name | ||
opts[:ems_cluster_uid] = rec.uid_ems | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lfu @gtanzillo Should we retain setting the existing columns as well as adding in the target? I am thinking that we are filtering on at least ems_id
in a number of places, like timelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmcculloug Agree, wouldn't hurt to leave that stuff in there.
Usually EmsEvent is used for provider events and MiqEvent is used for MIQ events. Keep the fields in MiqEvent for EVMAlertEvent. These fields are checked by event_where_clause. Alert can be set based on Datastores. But EmsEvent does not have a field for datastore. https://bugzilla.redhat.com/show_bug.cgi?id=1306308
So Timeline can get both EmsEvent and MiqEvent for EVMAlertEvent. https://bugzilla.redhat.com/show_bug.cgi?id=1306308
MiqEvent of EVMAlertEvent is checked by Timeline. https://bugzilla.redhat.com/show_bug.cgi?id=1306308
8859c54
to
c5d790a
Compare
@h-kataria Please help verify the changes for Timeline. |
c5d790a
to
1a0ca0c
Compare
Checked commits lfu/manageiq@f55b785~...1a0ca0c with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1 db/migrate/20160307205816_fix_event_class_for_evm_alert_event.rb
|
@gmcculloug UI changes look good, timelines in UI seem to be working fine. |
@gmcculloug @gtanzillo please review |
👍 Looks good! |
Usually EmsEvent is used for provider events and MiqEvent is used for MIQ events.
Alert can be set based on Datastores. But EmsEvent has fields for vm, host and ems_cluster but not for datastore.
https://bugzilla.redhat.com/show_bug.cgi?id=1306308