[Engine-devel] Design review summary for 3.2 - adding support for External Events

Eli Mesika emesika at redhat.com
Mon Nov 19 21:39:53 UTC 2012



----- Original Message -----
> From: "Chris Frantz" <Chris.Frantz at hp.com>
> To: "Eli Mesika" <emesika at redhat.com>, "engine-devel" <engine-devel at ovirt.org>
> Sent: Monday, November 19, 2012 6:03:37 PM
> Subject: RE: [Engine-devel] Design review summary for 3.2 - adding support for	External Events
> 
> Eli,
> 
> I've reviewed the Detailed Design for External Events.  Overall, the
> design looks good, but I have a few questions:

Hi Chris
Please see my answers below

> 
> 1. Can I provide additional data with the event:
> 
> AuditLogSeverity = EXTERNAL_EVENT_WARNING
> Message = "Enclosure RACK15ENC3: Fan in bay 5 failed"
> Vendor = "HP"
> CustomEventId = 12345
> DataCenterId = "Houston" (I assume this is really the UUID of the
> data center)
> ExtraData = { "enclosure": "RACK15ENC3", "bay": 5, "partnum":
> "412140-B21", "spare": "413996-001", "model": "Active Cool 200 Fan",
> "zone": 2}

I have added a CustomData field to the design to support that.(please see updated design page)

> 
> 2. What is the meaning of this statement on the DetailedDesign page:
> 
> External Events can not use application variables, therefore no '$'
> expressions should appear in the Event/Alert free message text
> 
> Does this mean the Message has to be fixed text with no substitution
> variables?  Can I do this:
> 
> Message = "Enclosure {ExtraData.enclosure}: Fan in bay
> {ExtraData.bay} failed.  Replace with {ExtraData.spare}."

We are using ${variable name} in messages to automatically substitute values to variables that appears in the message text.
In order to prevent confusion between application variable substitution and external events variable substitution we offer that external events will use a different pattern, the sample you have attached above will perfectly work.
This is just a suggestion, not an enforcement, since the Audit Log mechanism will leave variables in the text that failed variable substitution as is, so if the text has a ${myvar} inside the text, it will not be touched.
In any case, it is the plug-in responsibility to build and parse those variables while the engine will store the whole message as plain text.


> 
> 3. Considering that the Event has a number of IDs associated with it
> (UserId, DataCenterId, HostId, VmId, etc), does that mean an event
> can be associated with multiple entities at once?  "Host X in
> Cluster Y in Datacenter Z has exceeded the critical temperature
> threshold.  Shutting down."

Sure, you just have to set all relevant IDs when you add the event.

> 
> How will this be expanded in the future as oVirt Engine becomes aware
> of more types of entities (enclosures, rack managers, advanced
> networking switches/fabrics)?

When new entities will be added to the system, we will expand the Audit Log mechanism to support those events.
A good example of that is Gluster, that once added , has gluster_volume_id and gluster_volume_name in audit_log table and its own events.

> Is it be possible for an event to be associated with multiple hosts?

Currently not, but you can still invoke the same event on multiple entities

> 
> To return to the fan failure scenario above, if a fan in an enclosure
> fails, all of the hosts in that fan's fanzone will be effected.

I think that even for this scenario, you still look at it as a Host event, you probably expect that when you are selecting the Host in the UI, you will see this event, so, even if the event was on a collection of Hosts , its still technically a loop that adds the same event for the hosts in that fan's fanzone.
Does that make sense ?

> 
> Thanks,
> --Chris
> 
> 



More information about the Devel mailing list