Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

octavia_tempest_plugin shouldn't run when the test bundle doesn't contain octavia #603

Open
lourot opened this issue Jul 19, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@lourot
Copy link
Contributor

lourot commented Jul 19, 2021

zaza.openstack.charm_tests.tempest.setup.render_tempest_config_keystone_v3's logic for detecting the presence of Octavia or not in the bundle is correct and properly produces a tempest.conf containing this when Octavia is absent:

[service_available]
octavia = false

However this seems not to be enough and running zaza.openstack.charm_tests.tempest.tests.TempestTest against such a bundle (with no Octavia) still attempts to run octavia_tempest_plugin.tests.scenario.v2.test_traffic_ops.TrafficOperationsScenarioTest.setUpClass, which then fails as follows:

setUpClass (octavia_tempest_plugin.tests.scenario.v2.test_traffic_ops.TrafficOperationsScenarioTest)
----------------------------------------------------------------------------------------------------

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/test.py", line 181, in setUpClass
    raise value.with_traceback(trace)

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/test.py", line 166, in setUpClass
    cls.setup_credentials()

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/octavia_tempest_plugin/tests/test_base.py", line 103, in setup_credentials
    super(LoadBalancerBaseTest, cls).setup_credentials()

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/test.py", line 422, in setup_credentials
    manager = cls.get_client_manager(roles=credentials_type[1:],

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/test.py", line 700, in get_client_manager
    creds = cred_provider.get_creds_by_roles(**params)

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/lib/common/dynamic_creds.py", line 495, in get_creds_by_roles
    return self.get_credentials(roles, scope=scope)

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/lib/common/dynamic_creds.py", line 395, in get_credentials
    credentials = self._create_creds(

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/lib/common/dynamic_creds.py", line 251, in _create_creds
    self.creds_client.assign_user_role(user, project, role)

      File "/home/ubuntu/Documents/git/charmed-openstack-tester/.tox/charm-upgrade-focal-ussuri/lib/python3.8/site-packages/tempest/lib/common/cred_client.py", line 78, in assign_user_role
    raise lib_exc.NotFound(msg)

    tempest.lib.exceptions.NotFound: Object not found
Details: No "load-balancer_member" role found
@lourot
Copy link
Contributor Author

lourot commented Jul 19, 2021

Can be reproduced with openstack-charmers/charmed-openstack-tester#45

@freyes freyes added the bug Something isn't working label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants