canonical / snap-tempest

This repository contains the source code of the snap for the OpenStack integration test suite, Tempest.
Apache License 2.0
2 stars 11 forks source link

discover-tempest-config can't list projects #51

Closed Sponge-Bas closed 1 year ago

Sponge-Bas commented 1 year ago

Following the installation steps as lined out in the readme on OpenStack bobcat:

ubuntu@lab1-silo3-test:~/cloud-01$ cat ~/project/generated/openstack/novarc
export OS_TENANT_NAME=admin
export OS_DOMAIN_NAME=admin_domain
export OS_USER_DOMAIN_NAME=admin_domain
export OS_PROJECT_NAME=admin
export OS_PROJECT_DOMAIN_NAME=admin_domain
export OS_AUTH_TYPE=password
export OS_INTERFACE=public
export OS_USERNAME=admin
export OS_PASSWORD=<redacted>
export OS_REGION_NAME=RegionOne
export OS_DOMAIN_NAME=admin_domain
export OS_IDENTITY_API_VERSION=3
export OS_CACERT=/home/ubuntu/sqa-labs/ssl/root.pem
export OS_AUTH_URL=https://keystone.silo3.lab1.solutionsqa:5000/v3
ubuntu@lab1-silo3-test:~/cloud-01$ source ~/project/generated/openstack/novarc
ubuntu@lab1-silo3-test:~/cloud-01$ discover-tempest-config
2023-10-25 19:04:09.671 22501 INFO tempest [-] Using tempest config file /home/ubuntu/cloud-01/etc/tempest.conf
2023-10-25 19:04:09.724 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: barbican_tests
2023-10-25 19:04:09.724 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: blazar_tests
2023-10-25 19:04:09.724 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: cinder_tests
2023-10-25 19:04:09.724 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: cloudkitty_tests
2023-10-25 19:04:09.725 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: cyborg_tempest_plugin
2023-10-25 19:04:09.725 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: designate
2023-10-25 19:04:09.725 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: aws_tests
2023-10-25 19:04:09.725 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: freezer_tests
2023-10-25 19:04:09.725 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: glance_tests
2023-10-25 19:04:09.726 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: heat
2023-10-25 19:04:09.726 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: ironic_tests
2023-10-25 19:04:09.726 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: keystone_tests
2023-10-25 19:04:09.726 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: kuryr_tempest_tests
2023-10-25 19:04:09.727 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: magnum_tests
2023-10-25 19:04:09.727 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: manila_tests
2023-10-25 19:04:09.727 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: mistral_test
2023-10-25 19:04:09.727 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: monasca_tests
2023-10-25 19:04:09.727 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: murano_tests
2023-10-25 19:04:09.728 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: neutron_tests
2023-10-25 19:04:09.728 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: octavia-tempest-plugin
2023-10-25 19:04:09.728 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: oswin_tempest_plugin
2023-10-25 19:04:09.728 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: senlin-tempest-plugin
2023-10-25 19:04:09.728 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: solum_tests
2023-10-25 19:04:09.728 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: telemetry_tests
2023-10-25 19:04:09.729 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: trove_tests
2023-10-25 19:04:09.729 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: venus_tempest_plugin
2023-10-25 19:04:09.729 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: vitrage_tests
2023-10-25 19:04:09.729 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: watcher_tests
2023-10-25 19:04:09.729 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: zaqar_tests
2023-10-25 19:04:09.729 22501 INFO tempest.test_discover.plugins [-] Register additional config options from Tempest plugin: zun_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: barbican_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: blazar_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: cinder_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: cloudkitty_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: cyborg_tempest_plugin
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: designate
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: aws_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: freezer_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: glance_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: heat
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: ironic_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: keystone_tests
2023-10-25 19:04:09.730 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: kuryr_tempest_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: magnum_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: manila_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: mistral_test
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: monasca_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: murano_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: neutron_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: octavia-tempest-plugin
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: oswin_tempest_plugin
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: senlin-tempest-plugin
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: solum_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: telemetry_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: trove_tests
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: venus_tempest_plugin
2023-10-25 19:04:09.731 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: vitrage_tests
2023-10-25 19:04:09.732 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: watcher_tests
2023-10-25 19:04:09.732 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: zaqar_tests
2023-10-25 19:04:09.732 22501 INFO tempest.test_discover.plugins [-] List additional config options registered by Tempest plugin: zun_tests
2023-10-25 19:04:09.801 22501 INFO tempest.lib.common.rest_client [req-01555d62-788e-4d76-9986-bc2288442760 req-01555d62-788e-4d76-9986-bc2288442760 ] Request (main): 401 POST https://keystone.silo3.lab1.solutionsqa:5000/v3/auth/tokens 0.042s
2023-10-25 19:04:09.802 22501 CRITICAL tempest [-] Unhandled error: tempest.lib.exceptions.Unauthorized: Unauthorized
Details: The request you have made requires authentication.
2023-10-25 19:04:09.802 22501 ERROR tempest Traceback (most recent call last):
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/bin/discover-tempest-config", line 10, in <module>
2023-10-25 19:04:09.802 22501 ERROR tempest     sys.exit(main())
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/config_tempest/main.py", line 584, in main
2023-10-25 19:04:09.802 22501 ERROR tempest     config_tempest(
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/config_tempest/main.py", line 520, in config_tempest
2023-10-25 19:04:09.802 22501 ERROR tempest     clients = ClientManager(conf, credentials)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/config_tempest/clients.py", line 177, in __init__
2023-10-25 19:04:09.802 22501 ERROR tempest     project = self.projects.get_project_by_name(creds.project_name)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/config_tempest/clients.py", line 62, in get_project_by_name
2023-10-25 19:04:09.802 22501 ERROR tempest     projects = self.client.list_projects()['projects']
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/services/identity/v3/projects_client.py", line 46, in list_projects
2023-10-25 19:04:09.802 22501 ERROR tempest     resp, body = self.get(url)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/common/rest_client.py", line 322, in get
2023-10-25 19:04:09.802 22501 ERROR tempest     return self.request('GET', url, extra_headers, headers,
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/common/rest_client.py", line 726, in request
2023-10-25 19:04:09.802 22501 ERROR tempest     resp, resp_body = self._request(method, url, headers=headers,
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/common/rest_client.py", line 589, in _request
2023-10-25 19:04:09.802 22501 ERROR tempest     req_url, req_headers, req_body = self.auth_provider.auth_request(
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/auth.py", line 185, in auth_request
2023-10-25 19:04:09.802 22501 ERROR tempest     auth_url, auth_headers, auth_body = self._decorate_request(
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/auth.py", line 275, in _decorate_request
2023-10-25 19:04:09.802 22501 ERROR tempest     auth_data = self.get_auth()
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/auth.py", line 148, in get_auth
2023-10-25 19:04:09.802 22501 ERROR tempest     self.set_auth()
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/auth.py", line 157, in set_auth
2023-10-25 19:04:09.802 22501 ERROR tempest     self.cache = self._get_auth()
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/auth.py", line 312, in _get_auth
2023-10-25 19:04:09.802 22501 ERROR tempest     token, auth_data = auth_func(**auth_params)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/services/identity/v3/token_client.py", line 190, in get_token
2023-10-25 19:04:09.802 22501 ERROR tempest     body = self.auth(**kwargs)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/services/identity/v3/token_client.py", line 143, in auth
2023-10-25 19:04:09.802 22501 ERROR tempest     resp, body = self.post(self.auth_url, body=body)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/common/rest_client.py", line 300, in post
2023-10-25 19:04:09.802 22501 ERROR tempest     return self.request('POST', url, extra_headers, headers, body, chunked)
2023-10-25 19:04:09.802 22501 ERROR tempest   File "/snap/tempest/143/lib/python3.10/site-packages/tempest/lib/services/identity/v3/token_client.py", line 170, in request
2023-10-25 19:04:09.802 22501 ERROR tempest     raise exceptions.Unauthorized(resp_body['error']['message'])
2023-10-25 19:04:09.802 22501 ERROR tempest tempest.lib.exceptions.Unauthorized: Unauthorized
2023-10-25 19:04:09.802 22501 ERROR tempest Details: The request you have made requires authentication.
2023-10-25 19:04:09.802 22501 ERROR tempest

I have seen issues before with tempest where plugins try to list projects while that is not allowed by the keystone policy. Are there extra steps needed for the tempest snap to generate the temepst config?

Sponge-Bas commented 1 year ago

Closing this bug again, it was a config issue on my side. My environment didn't have access to keystone.silo3.lab1.solutionsqa