Access to the wrong endpoint of keystone after keystoneclient initialization.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
In Progress
|
Undecided
|
Ilya Zubov |
Bug Description
If we have an openstack installation with several regions and each region has its own endpoint of keystone, then an event-trigger or cron-trigger may fail with the following stack trace:
File "/opt/mistral/
method = self._get_
File "/opt/mistral/
return self._create_
File "/opt/mistral/
session_
File "/opt/mistral/
context=
File "/opt/mistral/
project_
File "/opt/mistral/
service_catalog = obtain_
File "/opt/mistral/
if ctx.is_trust_scoped and is_token_
File "/opt/mistral/
return 'OS-TRUST:trust' in client_
File "/opt/mistral/
allow_
File "/opt/mistral/
resp, body = self._client.
File "/opt/mistral/
return self.request(url, 'GET', **kwargs)
File "/opt/mistral/
resp = super(LegacyJso
File "/opt/mistral/
return self.session.
File "/opt/mistral/
resp = send(**kwargs)
File "/opt/mistral/
raise exceptions.
The error occurs because the keystoneclient object is created without specifying a region and an attempt is made to query endpoint from a random region that cannot be accessed.
When creating a keystoneclient object, it is necessary to determine the region in which the trigger is executed.
Fix proposed to branch: stable/stein /review. opendev. org/#/c/ 707780/
Review: https:/