Context attributes in events for event engine
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
New
|
Undecided
|
Unassigned |
Bug Description
We use the event engine for managing DNS records with Designate service. To create "PTR" records for each "A" record, the following event trigger used:
{
"Workflow ID": "feb60678-
"Exchange": "designate",
"Event": "dns.recordset.
"Topic": "notifications",
"Params": "{}",
"Updated at": null,
"ID": "414be2c6-
"Created at": "2019-12-18 16:42:16",
"Name": "cloud.
}
Here is an example of event_definitio
cat /etc/mistral/
- event_types:
- dns.*
properties:
event: <% $ %>
project_id: <% $.context.project %>
user_id: <% $.context.user %>
The problem is context from service has attributes <user> and <project> but not <user_id> and <project_id> [1], [2], [3]. Here is an example of an event:
"event": {
],
},
],
}
}
As a result, the trigger cannot start the workflow because default_
[1] https:/
[2] https:/
[3] https:/
The example context for compute. instance. create. end event (both project and project_id are present):
"context": {
"domain" : null,
"project_ domain" : "95ab4645f0764a c782765cbdcc79b bff",
"auth_ token": "",
"resource_ uuid": null,
"read_ only": false,
"user_ id": "bbe117ded75070 4ba460feaabff61 90c6b07c9acabc9 1066878cfca0c83 62f48",
"system_ scope": null,
"user_ identity" : "bbe117ded75070 4ba460feaabff61 90c6b07c9acabc9 1066878cfca0c83 62f48 40e5d3f91fb44cc aa9056252efc243 a7 - 95ab4645f0764ac 782765cbdcc79bb ff 95ab4645f0764ac 782765cbdcc79bb ff",
"is_ admin_project" : true,
"tenant" : "40e5d3f91fb44c caa9056252efc24 3a7",
"project_ id": "40e5d3f91fb44c caa9056252efc24 3a7",
"user_ name": "my_user",
"client_ timeout" : null,
"project_ name": "my_project",
"global_ request_ id": null,
"timestamp ": "2020-03- 16T07:58: 10.676305" ,
"remote_ address" : "172.30.202.28",
"quota_ class": null,
"is_ admin": false, 4ba460feaabff61 90c6b07c9acabc9 1066878cfca0c83 62f48",
"service_ catalog" : [
"read_ deleted" : "no",
"show_ deleted" : false,
"roles" : [
"user"
"project" : "40e5d3f91fb44c caa9056252efc24 3a7",
"request_ id": "req-80c91d5b- 2b22-4aca- 800e-e27cf65949 f1",
"user_ domain" : "95ab4645f0764a c782765cbdcc79b bff"
"user": "bbe117ded75070
],
],
}