A mistral cron trigger can only be created if the deprecated configuration option auth_uri[1] is set.
Steps to reproduce:
1. Remove auth_uri from mistral.conf and just let the option www_authenticate_uri set
2. Try to create a cron trigger: openstack cron trigger create --pattern "0 6 * * *" test_cron test_wf '{}'
The output will look like this:
# openstack cron trigger create --pattern "0 6 * * *" test_cron test_wf '{}'
Authorization failed: Cannot authenticate without an auth_url
and the Logfile:
2018-10-09T10:32:17.300+02:00 ossrv mistral: 2018-10-09 10:32:17.125 31274 ERROR wsme.api [req-d7c2e3db-8915-40a0-9b08-fc3e91f96acd 4bcb079497dd4e76a1ae18b9351157d8 017488aadb9247a5bbf0a58f70702d9a - default default] Server-side error: "Authorization failed: Cannot authenticate without an auth_url". Detail:
2018-10-09T10:32:17.300+02:00 ossrv mistral: Traceback (most recent call last):
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/wsmeext/pecan.py", line 85, in callfunction
2018-10-09T10:32:17.300+02:00 ossrv mistral: result = f(self, *args, **kwargs)
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/api/controllers/v2/cron_trigger.py", line 78, in post
2018-10-09T10:32:17.300+02:00 ossrv mistral: workflow_id=values.get('workflow_id')
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/db/utils.py", line 88, in decorate
2018-10-09T10:32:17.300+02:00 ossrv mistral: return retry.call(_with_auth_context, auth_ctx, func, *args, **kw)
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/utils/rest_utils.py", line 247, in call
2018-10-09T10:32:17.300+02:00 ossrv mistral: return super(MistralRetrying, self).call(fn, *args, **kwargs)
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/tenacity/__init__.py", line 330, in call
2018-10-09T10:32:17.300+02:00 ossrv mistral: start_time=start_time)
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/tenacity/__init__.py", line 279, in iter
2018-10-09T10:32:17.300+02:00 ossrv mistral: return fut.result()
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/concurrent/futures/_base.py", line 455, in result
2018-10-09T10:32:17.300+02:00 ossrv mistral: return self.__get_result()
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/tenacity/__init__.py", line 333, in call
2018-10-09T10:32:17.300+02:00 ossrv mistral: result = fn(*args, **kwargs)
2018-10-09T10:32:17.300+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/db/utils.py", line 45, in _with_auth_context
2018-10-09T10:32:17.300+02:00 ossrv mistral: return func(*args, **kw)
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/services/triggers.py", line 130, in create_cron_trigger
2018-10-09T10:32:17.301+02:00 ossrv mistral: security.add_trust_id(trigger_parameters)
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/services/security.py", line 110, in add_trust_id
2018-10-09T10:32:17.301+02:00 ossrv mistral: trust = create_trust()
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/services/security.py", line 41, in create_trust
2018-10-09T10:32:17.301+02:00 ossrv mistral: client = keystone.client()
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/mistral/utils/openstack/keystone.py", line 41, in client
2018-10-09T10:32:17.301+02:00 ossrv mistral: auth_url=auth_url
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/keystoneclient/v3/client.py", line 263, in __init__
2018-10-09T10:32:17.301+02:00 ossrv mistral: self.authenticate()
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 578, in authenticate
2018-10-09T10:32:17.301+02:00 ossrv mistral: resp = self.get_raw_token_from_identity_service(**kwargs)
2018-10-09T10:32:17.301+02:00 ossrv mistral: File "/usr/lib/python2.7/dist-packages/keystoneclient/v3/client.py", line 349, in get_raw_token_from_identity_service
2018-10-09T10:32:17.301+02:00 ossrv mistral: _('Authorization failed: %s') % e)
2018-10-09T10:32:17.301+02:00 ossrv mistral: AuthorizationFailure: Authorization failed: Cannot authenticate without an auth_url
2018-10-09T10:32:17.301+02:00 ossrv mistral: : AuthorizationFailure: Authorization failed: Cannot authenticate without an auth_url
[1] auth_uri configuration option is deprecated
2018-10-09T10:32:49.323+02:00 ossrv mistral: 2018-10-09 10:32:48.377 31579 WARNING oslo_config.cfg [-] Deprecated: Option "auth_uri" from group "keystone_authtoken" is deprecated for removal (The auth_uri option is deprecated in favor of www_authenticate_uri and will be removed in the S release.). Its value may be silently ignored in the future.
Affected openstack releases (others not tested):
- Queens
- Rocky
will be fixed when https:/ /review. openstack. org/#/c/ 594187 is merged and auth_uri is no longer supported in stein release