Bug 1370521 - operator_role in tempest.conf is SwiftOperator instead of swiftoperator making the s3 tests to fail
Summary: operator_role in tempest.conf is SwiftOperator instead of swiftoperator makin...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rhosp-director
Version: 9.0 (Mitaka)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 11.0 (Ocata)
Assignee: Angus Thomas
QA Contact: Martin Kopec
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-26 14:33 UTC by Ramon Acedo
Modified: 2016-11-16 12:22 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-16 12:22:17 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Ramon Acedo 2016-08-26 14:33:14 UTC
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.

Comment 4 Martin Kopec 2016-11-16 12:22:17 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.