stackhpc / stackhpc/openstack-config

HTTP 401 Unauthorized when uploading SSH key

Offen
#57 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
Jinja
Sterne
5
Forks
8
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

If you provide an SSH key to assign to user it will fail with HTTP 401 Unauthorized.

TASK [stackhpc.openstack.os_projects : Ensure SSH keypairs are registered] ***************************************************************************************************************************************************************************************************************************
Friday 22 August 2025  12:53:56 +0000 (0:00:00.091)       0:00:20.321 *********
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-430ec8e6-8f20-483c-a0c8-1a791189b211)
failed: [localhost] (item=demo: id_ed25519) => changed=false
  ansible_loop_var: item
  item:
  - description: OpenStack demo project
    name: demo
    project_domain: Default
    quotas:
      backup_gigabytes: -1
      backups: -1
      cores: -1
      floatingip: -1
      gigabytes: -1
      injected_file_size: -1
      injected_files: -1
      instances: -1
      key_pairs: -1
      per_volume_gigabytes: -1
      ram: -1
      security_group: -1
      security_group_rule: -1
      snapshots: -1
      volumes: -1
    user_domain: Default
    users:
    - description: StackHPC Demo user
      email: demo@stackhpc.com
      name: demo
      password: *****
      roles:
      - member
      - reader
  - name: id_ed25519
    public_key: ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICKx4TMa8vtpOe3qHeMX4Z7JZyucBcqlfv8iFY6dZkzB
  module_stderr: |-
    Traceback (most recent call last):
      File "/home/stack/.ansible/tmp/ansible-tmp-1755867236.4199255-709459-103411628663297/AnsiballZ_keypair.py", line 107, in <module>
        _ansiballz_main()
      File "/home/stack/.ansible/tmp/ansible-tmp-1755867236.4199255-709459-103411628663297/AnsiballZ_keypair.py", line 99, in _ansiballz_main
        invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
      File "/home/stack/.ansible/tmp/ansible-tmp-1755867236.4199255-709459-103411628663297/AnsiballZ_keypair.py", line 47, in invoke_module
        runpy.run_module(mod_name='ansible_collections.openstack.cloud.plugins.modules.keypair', init_globals=dict(_module_fqn='ansible_collections.openstack.cloud.plugins.modules.keypair', _modlib_path=modlib_path),
      File "/usr/lib64/python3.9/runpy.py", line 225, in run_module
        return _run_module_code(code, init_globals, run_name, mod_spec)
      File "/usr/lib64/python3.9/runpy.py", line 97, in _run_module_code
        _run_code(code, mod_globals, init_globals,
      File "/usr/lib64/python3.9/runpy.py", line 87, in _run_code
        exec(code, run_globals)
      File "/tmp/ansible_openstack.cloud.keypair_payload_ve79l7iy/ansible_openstack.cloud.keypair_payload.zip/ansible_collections/openstack/cloud/plugins/modules/keypair.py", line 178, in <module>
      File "/tmp/ansible_openstack.cloud.keypair_payload_ve79l7iy/ansible_openstack.cloud.keypair_payload.zip/ansible_collections/openstack/cloud/plugins/modules/keypair.py", line 174, in main
      File "/tmp/ansible_openstack.cloud.keypair_payload_ve79l7iy/ansible_openstack.cloud.keypair_payload.zip/ansible_collections/openstack/cloud/plugins/module_utils/openstack.py", line 417, in __call__
      File "/tmp/ansible_openstack.cloud.keypair_payload_ve79l7iy/ansible_openstack.cloud.keypair_payload.zip/ansible_collections/openstack/cloud/plugins/modules/keypair.py", line 140, in run
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/openstack/service_description.py", line 89, in __get__
        proxy = self._make_proxy(instance)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/openstack/service_description.py", line 289, in _make_proxy
        found_version = temp_adapter.get_api_major_version()
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/adapter.py", line 352, in get_api_major_version
        return self.session.get_api_major_version(auth or self.auth, **kwargs)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/session.py", line 1289, in get_api_major_version
        return auth.get_api_major_version(self, **kwargs)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/identity/base.py", line 497, in get_api_major_version
        data = get_endpoint_data(discover_versions=discover_versions)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/identity/base.py", line 268, in get_endpoint_data
        service_catalog = self.get_access(session).service_catalog
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/identity/base.py", line 131, in get_access
        self.auth_ref = self.get_auth_ref(session)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/identity/generic/base.py", line 205, in get_auth_ref
        return self._plugin.get_auth_ref(session, **kwargs)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/identity/v3/base.py", line 185, in get_auth_ref
        resp = session.post(token_url, json=body, headers=headers,
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/session.py", line 1162, in post
        return self.request(url, 'POST', **kwargs)
      File "/home/stack/openstack-config/ansible/openstack-config-venv/lib64/python3.9/site-packages/keystoneauth1/session.py", line 985, 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-430ec8e6-8f20-483c-a0c8-1a791189b211)
  module_stdout: ''
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 1

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Reproduziere die Aufgabe „Ensure SSH keypairs are registered“ und beginne mit dem im Traceback gezeigten Modul ansible_collections.openstack.cloud keypair, insbesondere keypair.py und module_utils/openstack.py. Verfolge die an der fehlgeschlagenen Anfrage beteiligte Authentifizierungskonfiguration; als erledigt gilt die Aufgabe, wenn sie ohne HTTP 401 abgeschlossen wird und der bereitgestellte SSH-Schlüssel registriert ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
ansible
Bereich
cloud, infrastructure
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.