In OSP 9, after running /usr/share/openstack-tempest-10.0.0/tools/configure-tempest-directory in the ~stack/tempest directory, the operator_role is SwiftOperator:
[stack@undercloud-1 tempest]$ grep operator etc/tempest.conf
operator_role = SwiftOperator
In OSP 8 the same file is swiftoperator after running the configure-tempest-directory script for liberty:
[stack@undercloud-3 tempest]$ grep operator etc/tempest.conf
operator_role = swiftoperator
This causes the s3 tests to fail, e.g:
setUpClass (tempest.api.object_storage.test_object_services.ObjectTest)
-----------------------------------------------------------------------
Captured traceback:
~~~~~~~~~~~~~~~~~~~
Traceback (most recent call last):
File "/home/stack/tempest/tempest/test.py", line 280, in setUpClass
six.reraise(etype, value, trace)
File "/home/stack/tempest/tempest/test.py", line 268, in setUpClass
cls.setup_credentials()
File "/home/stack/tempest/tempest/api/object_storage/base.py", line 38, in setup_credentials
super(BaseObjectTest, cls).setup_credentials()
File "/home/stack/tempest/tempest/test.py", line 379, in setup_credentials
force_new=True)
File "/home/stack/tempest/tempest/test.py", line 535, in get_client_manager
creds = cred_provider.get_creds_by_roles(**params)
File "/home/stack/tempest/tempest/common/dynamic_creds.py", line 297, in get_creds_by_roles
return self.get_credentials(roles)
File "/home/stack/tempest/tempest/common/dynamic_creds.py", line 260, in get_credentials
credentials = self._create_creds(roles=credential_type)
File "/home/stack/tempest/tempest/common/dynamic_creds.py", line 145, in _create_creds
self.creds_client.assign_user_role(user, project, role)
File "/home/stack/tempest/tempest/common/cred_client.py", line 72, in assign_user_role
raise lib_exc.NotFound(msg)
tempest.lib.exceptions.NotFound: Object not found
Details: No "SwiftOperator" role found
As a workaround, deleting the role swiftoperator and adding SwiftOperator makes it work and I haven't tested it but I'd imagine setting operator_role = swiftoperator in tempest.conf as it previously was in OSP 8 would also work.
OSP uses lowercase operator for the role, so:
operator_role = swiftoperator
However, tempest default value is "SwiftOperator", which is the default value. Therefor when tempest.conf is created through config_tempest.py it's needed to add an argument to override the default value:
./tools/config_tempest.py object-storage.operator_role swiftoperator
For example:
$ /usr/share/openstack-tempest-*/tools/configure-tempest-directory
$ python tools/config_tempest.py --debug identity.uri $OS_AUTH_URL \
identity.admin_password $OS_PASSWORD \
object-storage.operator_role swiftoperator --create
This will create tempest.conf containing the right operator role value.
In OSP 9, after running /usr/share/openstack-tempest-10.0.0/tools/configure-tempest-directory in the ~stack/tempest directory, the operator_role is SwiftOperator: [stack@undercloud-1 tempest]$ grep operator etc/tempest.conf operator_role = SwiftOperator In OSP 8 the same file is swiftoperator after running the configure-tempest-directory script for liberty: [stack@undercloud-3 tempest]$ grep operator etc/tempest.conf operator_role = swiftoperator This causes the s3 tests to fail, e.g: setUpClass (tempest.api.object_storage.test_object_services.ObjectTest) ----------------------------------------------------------------------- Captured traceback: ~~~~~~~~~~~~~~~~~~~ Traceback (most recent call last): File "/home/stack/tempest/tempest/test.py", line 280, in setUpClass six.reraise(etype, value, trace) File "/home/stack/tempest/tempest/test.py", line 268, in setUpClass cls.setup_credentials() File "/home/stack/tempest/tempest/api/object_storage/base.py", line 38, in setup_credentials super(BaseObjectTest, cls).setup_credentials() File "/home/stack/tempest/tempest/test.py", line 379, in setup_credentials force_new=True) File "/home/stack/tempest/tempest/test.py", line 535, in get_client_manager creds = cred_provider.get_creds_by_roles(**params) File "/home/stack/tempest/tempest/common/dynamic_creds.py", line 297, in get_creds_by_roles return self.get_credentials(roles) File "/home/stack/tempest/tempest/common/dynamic_creds.py", line 260, in get_credentials credentials = self._create_creds(roles=credential_type) File "/home/stack/tempest/tempest/common/dynamic_creds.py", line 145, in _create_creds self.creds_client.assign_user_role(user, project, role) File "/home/stack/tempest/tempest/common/cred_client.py", line 72, in assign_user_role raise lib_exc.NotFound(msg) tempest.lib.exceptions.NotFound: Object not found Details: No "SwiftOperator" role found As a workaround, deleting the role swiftoperator and adding SwiftOperator makes it work and I haven't tested it but I'd imagine setting operator_role = swiftoperator in tempest.conf as it previously was in OSP 8 would also work.