[openstack-dev] [Vitrage] questions about "relationships"
Wang, Tony T (Nokia - CN)
tony_t.wang at nokia.com
Tue Apr 19 14:36:55 UTC 2016
One more question, I suppose "EvaluatorEventTransformer" is used to handle events sent by ScenarioEvaluator, and add/delete vertex/edge to the "global graph" triggered by Actions. Is it right?
From: EXT Wang, Tony T (Nokia - CN) [mailto:tony_t.wang at nokia.com]
Sent: Tuesday, April 19, 2016 10:01 PM
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [Vitrage] questions about "relationships"
Hi Elisha,
Thanks for your quick response. I think I got your points.
To double confirm, further questions are coming :):
1. Regardless if there is template definition, Vitrage constructs a graph based on the data from plugins defined in datasources conf. Let's call it "global graph". Is it right?
2. "entities" and "relationships" defined in template "definitions" won't add any new vertex and edge to the "global graph". They are only used to be referred by "condition"/"action" in "scenarios" section. "condition" also uses them to construct another graph("ScenarioEvaluator._evaluate_and_condition"), let's call it "template graph". This template graph is used to find occurrences of a template graph in the "global" graph("NXAlgorithm.sub_graph_matching").
3. If so, which graph will be applied by the actions by ScenarioEvaluator?
For example, will "AddCausalRelationship" add "causes" edge to the "global graph" or "template graph"?
I suppose it should be "global graph". If so, it is possible the "global graph" will grow very huge someday?
Thanks,
Tony
From: Rosensweig, Elisha (Nokia - IL)
Sent: Tuesday, April 19, 2016 7:00 PM
To: Wang, Tony T (Nokia - CN); Weyl, Alexey (Nokia - IL); Afek, Ifat (Nokia - IL); Shamir, Ohad (Nokia - IL)
Subject: RE: [Vitrage] questions about "relationships"
Hi Tony,
Thanks for your interest in Vitrage! Any questions you might have, please send us. You may also send them to the openstack mailing list, and we will answer there as well.
Regarding your question:
* In the templates, the definitions in the "definitions" section are used only by the scenario(s) within the template - the condition, as well as the action, might reference these.
* These templates are used for business logic for the Scenario Evaluator, to detect patterns in the Entity Graph and perform subsequent actions.
* On the other hand, the populating of this Entity Graph is done via Datasources. In the Transformer of each datasource, we define how we want to integrate the data received into the Entity Graph, what labels each edge (=relationship) will have etc.
For example, the InstanceTransformer will define that whenever we add an instance to the Entity Graph, the instance is related to it's host with a "contains" relationship. The template, on the other hand, states "IF there is a host in error AND this host contains an instance, THEN do XXX".
So indeed, we need the conditions in the template to use the same "language" as the transformers do, for example in using the labels. Currently, this mapping is implicitly assumed to be identical (i.e., the two use the same labels). In the future we will probably add a mapping configuration file, which maps the transformer values to those in the templates.
Is this clear?
Thanks,
Elisha
From: Wang, Tony T (Nokia - CN)
Sent: Tuesday, April 19, 2016 1:13 PM
To: Wang, Tony T (Nokia - CN); Weyl, Alexey (Nokia - IL); Afek, Ifat (Nokia - IL); Rosensweig, Elisha (Nokia - IL); Shamir, Ohad (Nokia - IL)
Subject: RE: [Vitrage] questions about "relationships"
Looks like "EvaluatorEventTransformer._create_neighbors" is used to create the edge for relationship.
Is so, is it overlapped to define the relationship between "nova.instance" and "nova.host" since "InstanceTransformer._create_host_neighbor" should do the same work?
Thanks,
Tony
From: Wang, Tony T (Nokia - CN)
Sent: Tuesday, April 19, 2016 5:35 PM
To: 'alexey.weyl at nokia.com'; 'ifat.afek at nokia.com'; 'elisha.rosensweig at nokia.com'; 'ohad.shamir at nokia.com'
Subject: [Vitrage] questions about "relationships"
All,
I found Vitrage is an very impressive OpenStack project! :)
I have a few questions about the example:
https://github.com/openstack/vitrage/blob/master/doc/source/vitrage-template-format.rst#example-1-basic-rca-and-deduced-alarmstate
In this example, there is a "relationships" definition between nova host and nova instance:
- relationship:
source: host
target: instance
relationship_type: contains
template_id : host_contains_instance
My questions:
1. Is "relationship" used to create an edge or not?
2. I don't find the code for edge creation from "relationship". If not, the edge between "nova.host" and "nova.instance" should be created by function "InstanceTransformer._create_host_neighbor". Right?
3. If so, what's the purpose for "relationship"? Is it only used to parse the "condition" part in "scenarios"?
Thanks in advance,
Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20160419/3e03ad41/attachment.html>
More information about the OpenStack-dev
mailing list