summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIfat Afek <ifat.afek@nokia.com>2017-06-18 18:28:48 +0300
committerIfat Afek <ifat.afek@nokia.com>2017-06-18 18:28:48 +0300
commit0894e673e770e6fabab15fcae2d0eb3a9d1bd3e4 (patch)
tree5c783c2cc69314237d1a2cd2d06e5126a1e8f1fc
parenta50314704563cbe7da74ae9ef53412e35f36c73b (diff)
Delete the external-actions.rst file, it belongs in the vitrage-specs project
Notes
Notes (review): Code-Review+2: Eyal <eyal.bar-ilan@nokia.com> Code-Review+2: Alexey Weyl <alexey.weyl@nokia.com> Workflow+1: Alexey Weyl <alexey.weyl@nokia.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 19 Jun 2017 07:37:13 +0000 Reviewed-on: https://review.openstack.org/475180 Project: openstack/vitrage Branch: refs/heads/master
-rw-r--r--doc/source/external-actions.rst197
1 files changed, 0 insertions, 197 deletions
diff --git a/doc/source/external-actions.rst b/doc/source/external-actions.rst
deleted file mode 100644
index 99edd13..0000000
--- a/doc/source/external-actions.rst
+++ /dev/null
@@ -1,197 +0,0 @@
1..
2 This work is licensed under a Creative Commons Attribution 3.0 Unported
3 License.
4
5 http://creativecommons.org/licenses/by/3.0/legalcode
6
7=============================================
8Support External Actions in Vitrage Templates
9=============================================
10
11launchpad blueprint:
12https://blueprints.launchpad.net/vitrage/+spec/support-external-actions
13
14Currently, the Vitrage templates support the following actions: raise alarm,
15set state, mark causal relationship and mark-down.
16The implementation of mark-down is patchy (update a property on the vertex and
17call the notifier).
18
19We need a way to define in the template an external action that should be
20taken. One example is the mark-down. Another example is to execute a Mistral
21workflow or a Congress policy.
22
23Problem description
24===================
25
26The following use cases should be supported:
27
281. **mark-down**. This is an existing use case. If a mark-down action exists,
29 Vitrage will call Nova mark-down API. The behavior should remain the same
30 after the change.
312. **Execute a Mistral workflow**. The user should be able to execute a Mistral
32 workflow based on Vitrage insights.
333. **Execute other external actions**, like a Congress policy.
34
35Proposed change
36===============
37
38Add a new action for each external engine we would like to support. The action
39will have metadata with parameters to be sent to the engine.
40
41Examples
42--------
43
44.. code-block:: yaml
45
46 action:
47 action_type: execute_nova
48 metadata:
49 api_call: mark-down
50 host: host1
51
52
53.. code-block:: yaml
54
55 action:
56 action_type: execute_mistral
57 metadata:
58 workflow: evacuate_host
59 failed_host: host1
60
61
62The idea behind adding a new external_* action for each engine is to emphasize
63that Vitrage supports a predefined set of external actions, and specifically
64it does not support runinng scripts.
65
66The internal implementation will be identical for Nova, Mistral, Congress, etc.
67During the template loading phase, the execute_* action will be converted to
68a generic Execute action, with a notifier parameter. The template validator
69will verify that the wanted notifier is enabled in vitrage.conf, otherwise
70the template loading will fail.
71
72When executing the Execute action, the evaluator will send an event to the
73message bus of the wanted notifier. This way, only the Mistral notifier will
74handle the execute_mistral actions.
75
76Note that currently only the Vitrage graph sends notification to the notifier.
77This behavior will be changed, so notifications will be sent both from the
78graph (for deduced alarms and set state) and from the evaluator.
79
80
81Alternatives
82------------
83
84There are two alternatives:
85
86Send Message bus notifications
87~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88Vitrage can have a message bus notifier, that will send notifications about
89raise/delete alarm, set state and mark causal-relationship. Mistral will be
90configured to execute certain workflows based on the notifications received
91from Vitrage.
92
93Advantages:
94
95* No extra configuration needed in Vitrage
96* Can work with the current notifiers mechanism
97
98Disadvantages:
99
100* Messgae bus notifications might get lost
101* Less powerful. In Vitrage template the user can decide to execute a workflow
102 based on a combination of alarms or a specific topology. Once Mistral gets
103 the notifications, the topology context is no longer there.
104* mark-down use case is not supported by this solution
105
106Configuration Done on the specific notifier
107~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
108A Mistral notifier will be written and receive notifications from the graph.
109It will be configured by a yaml file that will determine which workflow to
110execute per specific alarm.
111
112Advantages:
113
114* No extra configuration needed in Vitrage
115* Can work with the current notifiers mechanism
116* No lost messages
117
118Disadvantages:
119
120* Less powerful. In Vitrage template the user can decide to execute a workflow
121 based on a combination of alarms or a specific topology. In Mistral notifier
122 we no longer have this context.
123* mark-down use case is not supported by this solution
124
125
126Data model impact
127-----------------
128
129A new Execute action will be added to the evaluator.
130
131REST API impact
132---------------
133
134None
135
136Versioning impact
137-----------------
138
139We should introduce a versioning mechanism to the templates. This will be done
140when modifying the implementation of mark-down.
141
142Other end user impact
143---------------------
144
145None
146
147Deployer impact
148---------------
149
150None
151
152Developer impact
153----------------
154
155None
156
157Horizon impact
158--------------
159
160None
161
162
163Implementation
164==============
165
166Assignee(s)
167-----------
168
169Primary assignee:
170 ifat-afek
171
172Work Items
173----------
174
175* Enhance the template language (template loading and validation)
176* Update the documentation
177* Execute the external actions from the evaluator
178
179Dependencies
180============
181
182None
183
184Testing
185=======
186
187The implementation will be covered by unit tests and tempest tests.
188
189Documentation Impact
190====================
191
192The new action should be documented
193
194References
195==========
196
197None