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:
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:
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:
{ 669f-458f- bca0-ea39dd7bdb 8a", create" , b692-42b9- a745-842955a541 38", events. dns.create_ ptr"
"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 ns.yaml for such events:
cat /etc/mistral/ event_definitio ns.yaml
- 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": {
"publisher ": "central. 172.30. 0.134",
"context" : {
"domain" : null,
"project_ domain" : null,
"auth_ token": "gAAAAABd_ Jfa9ELieG6_ mXivzbdkTqaprOK RzAXYvQH0NXyD8A KfbqJ22ppjtTHg2 6wrln8TCLJWscHs v8YowSfQl70Fs9N BSdgrCqJ- BFTTqvDMPfLXLWn LcevK4CCrPWW7ds KllRGvs3KqWkQSn VBtoDj4Wy6QZKuI KtKJIPMgv35Su70 -pmSg5VUCkkVHLq VcfOT1wx4z" ,
"resource_ uuid": null,
"original_ tenant" : null,
"read_ only": false,
"system_ scope": null,
"user_ identity" : "ad64ce5e9890b9 596163edd10c8a4 da2bca62c4f84f7 20b59cf30d20903 c60ab 975d866668854d1 4b6cb37d6a97801 72 - - -",
"is_admin_ project" : true,
"hide_ counts" : false,
"client_ timeout" : null,
"global_ request_ id": null,
"is_admin" : false,
"user" : "ad64ce5e9890b9 596163edd10c8a4 da2bca62c4f84f7 20b59cf30d20903 c60ab",
"service_ catalog" : []
"tsigkey_ id": null,
"all_ tenants" : false,
"tenant" : "975d866668854d 14b6cb37d6a9780 172",
"show_ deleted" : false,
"roles" : [
" admin"
"edit_ managed_ records" : false,
"client_ addr": "172.30.44.64",
"project" : "975d866668854d 14b6cb37d6a9780 172",
"request_ id": "req-a272bad3- 8621-401f- 9584-11f7dcfb71 5c",
"abandon" : null,
"user_ domain" : null
"event_ type": "dns.recordset. create" ,
"timestamp ": "2019-12-20 09:43:59.434517",
"payload" : {
"zone_ id": "70a6c3e9- fbd7-4b9a- beb5-841046754d e3",
"tenant_ id": "975d866668854d 14b6cb37d6a9780 172",
"created_ at": "2019-12- 20T09:43: 59.393688" ,
"description" : "None",
"updated_ at": null,
"records" : [
{
"status" : "PENDING",
"zone_ id": "70a6c3e9- fbd7-4b9a- beb5-841046754d e3",
"managed" : false,
"managed_ resource_ id": null,
"managed_ resource_ type": null,
"tenant_ id": "975d866668854d 14b6cb37d6a9780 172",
"created_ at": "2019-12- 20T09:43: 59.405292" ,
"managed_ extra": null,
"updated_ at": null,
"managed_ plugin_ type": null,
"version" : 1,
"managed_ plugin_ name": null,
"managed_ tenant_ id": null,
"action" : "CREATE",
"hash" : "0ee96e7ffa25e0 a81485d7200bc55 e11",
"managed_ resource_ region" : null,
"recordset_ id": "440305dc- f31a-4c0e- abbb-e626f3beec 5b",
"data" : "srv8-jobscdc. delivery. cloud",
"id" : "2d0acbcb- b5f6-4a10- adee-b8c5c7b1b0 2b",
"serial" : 1576835039,
"description ": null
}
"version" : 1,
"ttl" : null,
"zone_ name": "176.30. 172.in- addr.arpa. ",
"type" : "PTR",
"id": "440305dc- f31a-4c0e- abbb-e626f3beec 5b",
"name" : "213.176. 30.172. in-addr. arpa."
],
},
],
}
}
As a result, the trigger cannot start the workflow because default_ event_engine cannot match the context with the event trigger owner.
https:/ /github. com/openstack/ mistral/ blob/master/ mistral/ event_engine/ default_ event_engine. py#L295 /github. com/openstack/ mistral/ blob/master/ mistral/ event_engine/ default_ event_engine. py#L44 /github. com/openstack/ mistral/ blob/master/ mistral/ event_engine/ default_ event_engine. py#L45
https:/
https:/