This tempest test, when used from the upstream plugin fails due to keystone policy:
octavia_tempest_plugin.tests.api.v2.test_load_balancer.LoadBalancerAPITest.test_load_balancer_list
-------------------------------------------------------------------------------------------------
Traceback (most recent call last):
File "/home/ubuntu/snap/fcbtest/x1/.rally/verification/verifier-191296ad-d570-4dc9-8243-cfd028acdadb/repo/tempest/test.py", line 181, in setUpClass
raise value.with_traceback(trace)
File "/home/ubuntu/snap/fcbtest/x1/.rally/verification/verifier-191296ad-d570-4dc9-8243-cfd028acdadb/repo/tempest/test.py", line 166, in setUpClass
cls.setup_credentials()
File "/snap/fcbtest/x1/lib/python3.6/site-packages/octavia_tempest_plugin/tests/test_base.py", line 150, in setup_credentials
**params)['role_assignments']
File "/home/ubuntu/snap/fcbtest/x1/.rally/verification/verifier-191296ad-d570-4dc9-8243-cfd028acdadb/repo/tempest/lib/services/identity/v3/role_assignments_client.py", line 46, in list_role_assignments
resp, body = self.get(url)
File "/home/ubuntu/snap/fcbtest/x1/.rally/verification/verifier-191296ad-d570-4dc9-8243-cfd028acdadb/repo/tempest/lib/common/rest_client.py", line 314, in get
return self.request('GET', url, extra_headers, headers)
File "/home/ubuntu/snap/fcbtest/x1/.rally/verification/verifier-191296ad-d570-4dc9-8243-cfd028acdadb/repo/tempest/lib/common/rest_client.py", line 703, in request
self._error_checker(resp, resp_body)
File "/home/ubuntu/snap/fcbtest/x1/.rally/verification/verifier-191296ad-d570-4dc9-8243-cfd028acdadb/repo/tempest/lib/common/rest_client.py", line 804, in _error_checker
raise exceptions.Forbidden(resp_body, resp=resp)
tempest.lib.exceptions.Forbidden: Forbidden
Details: {'code': 403, 'message': 'You are not authorized to perform the requested action: identity:list_role_assignments.', 'title': 'Forbidden'}
-------------------------------------------------------------------------------------------------
Snippets of keystone policy for this action:
-------------------------------------------------------------------------------------------------
"admin_required": "role:Admin",
"cloud_admin": "rule:admin_required and (is_admin_project:True or domain_id:<admin_domain_id> or project_id:<project_named_services_id>)",
"admin_on_domain_filter": "rule:admin_required and domain_id:%(scope.domain.id)s",
"admin_on_project_filter": "rule:admin_required and project_id:%(scope.project.id)s",
"admin_on_domain_of_project_filter": "rule:admin_required and domain_id:%(target.project.domain_id)s",
"identity:list_role_assignments": "rule:cloud_admin or rule:admin_on_domain_filter or rule:admin_on_project_filter",
-------------------------------------------------------------------------------------------------
Tempest definitely gets the Admin role, I'm not sure why it fails the other rules. It might be a bug or wrong setting in tempest. Commands from the CLI have no problems.
Tempest might be asking for a token from one domain and attempting to list role assignments from another domain, but I can't find proof of this in the logs.
I am wondering if the keystone policy is too strict for the tempest test.
Possibly duplicate of https:/ /bugs.launchpad .net/charm- keystone/ +bug/1830076
1830076 has overlapping keystone policy rule:cloud_admin