Comment 10 for bug 1850656

Revision history for this message
Niklas Hagman (blinkiz) wrote :

Settings:
[oslo_policy]
enforce_scope = True

GET /v3/services
identity:list_services

"openstack_auth": {
  "auth_url": "http://192.0.2.10:35357",
  "username": "admin",
  "password": "9PJVm6kJI1k00JgNzhXpRAosMAXBkIqSSmDYDwR3"
}

Error:
keystoneauth1.exceptions.http.BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-ea92e74e-2cf1-4524-9c78-a02f24a180a1)

Goal:
Getting auth into scope 'system'. I can not figure out how to do this.

-------------------------

Traceback (most recent call last):
  File "/tmp/ansible-tmp-1573484557.4130447-82566091548974/AnsiballZ_os_keystone_service.py", line 114, in <module>
    _ansiballz_main()
  File "/tmp/ansible-tmp-1573484557.4130447-82566091548974/AnsiballZ_os_keystone_service.py", line 106, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/tmp/ansible-tmp-1573484557.4130447-82566091548974/AnsiballZ_os_keystone_service.py", line 49, in invoke_module
    imp.load_module('__main__', mod, module, MOD_DESC)
  File "/opt/ansible/lib/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/opt/ansible/lib/python3.6/imp.py", line 170, in load_source
    module = _exec(spec, sys.modules[name])
  File "<frozen importlib._bootstrap>", line 618, in _exec
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/tmp/ansible_os_keystone_service_payload_4370z2m9/__main__.py", line 194, in <module>
  File "/tmp/ansible_os_keystone_service_payload_4370z2m9/__main__.py", line 153, in main
  File "/opt/ansible/lib/python3.6/site-packages/openstack/cloud/_identity.py", line 510, in search_services
    services = self.list_services()
  File "/opt/ansible/lib/python3.6/site-packages/openstack/cloud/_identity.py", line 485, in list_services
    if self._is_client_version('identity', 2):
  File "/opt/ansible/lib/python3.6/site-packages/openstack/cloud/openstackcloud.py", line 459, in _is_client_version
    client = getattr(self, client_name)
  File "/opt/ansible/lib/python3.6/site-packages/openstack/cloud/_identity.py", line 32, in _identity_client
    'identity', min_version=2, max_version='3.latest')
  File "/opt/ansible/lib/python3.6/site-packages/openstack/cloud/openstackcloud.py", line 422, in _get_versioned_client
    endpoint_override=self.config.get_endpoint(service_type))
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/adapter.py", line 345, in get_api_major_version
    return self.session.get_api_major_version(auth or self.auth, **kwargs)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/session.py", line 1233, in get_api_major_version
    return auth.get_api_major_version(self, **kwargs)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 500, in get_api_major_version
    data = get_endpoint_data(discover_versions=discover_versions)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 258, in get_endpoint_data
    project_id = self.get_project_id(session)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 568, in get_project_id
    return self.get_access(session).project_id
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/identity/base.py", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/identity/generic/base.py", line 208, in get_auth_ref
    return self._plugin.get_auth_ref(session, **kwargs)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/identity/v3/base.py", line 184, in get_auth_ref
    authenticated=False, log=False, **rkwargs)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/session.py", line 1106, in post
    return self.request(url, 'POST', **kwargs)
  File "/opt/ansible/lib/python3.6/site-packages/keystoneauth1/session.py", line 943, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.BadRequest: Expecting to find domain in user. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-ea92e74e-2cf1-4524-9c78-a02f24a180a1)