Skip to content

feat: assert disabled projects to avoid nova API 401s as listed below:

This MR introduces:

  • asserts on disabled projects to avoid nova API 401s as listed below:
2024-05-31 09:26:13,960 project-migrator INFO E.02 Source OpenStack cloud project has 1 servers.
Traceback (most recent call last):
  File "/home/freznicek/prjs/muni/sources/gitlab.ics.muni.cz/g1-g2-ostack-cloud-migration.git/ci/./project-migrator.py", line 389, in <module>
    sys.exit(main(ARGS))
             ^^^^^^^^^^
  File "/home/freznicek/prjs/muni/sources/gitlab.ics.muni.cz/g1-g2-ostack-cloud-migration.git/ci/./project-migrator.py", line 117, in main
    destination_project_servers = lib.get_ostack_project_servers(destination_project_conn, destination_project)
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/freznicek/prjs/muni/sources/gitlab.ics.muni.cz/g1-g2-ostack-cloud-migration.git/ci/lib.py", line 163, in get_ostack_project_servers
    return tuple(ostack_connection.compute.servers())
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/openstack/service_description.py", line 87, in __get__
    proxy = self._make_proxy(instance)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/openstack/service_description.py", line 257, in _make_proxy
    temp_adapter = config.get_session_client(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/openstack/config/cloud_region.py", line 804, in get_session_client
    info = client.get_endpoint_data()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/adapter.py", line 312, in get_endpoint_data
    return self.session.get_endpoint_data(auth or self.auth, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/session.py", line 1260, in get_endpoint_data
    return auth.get_endpoint_data(self, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/identity/base.py", line 271, in get_endpoint_data
    service_catalog = self.get_access(session).service_catalog
                      ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/identity/base.py", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/identity/v3/base.py", line 187, in get_auth_ref
    resp = session.post(token_url, json=body, headers=headers,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/session.py", line 1149, in post
    return self.request(url, 'POST', **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/keystoneauth1/session.py", line 986, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-6abc7a21-3fac-4955-a2fc-a777f9be1d8e)

Merge request reports