Drop the path from the auth_url.

The template previously could use v2.0 depending on the value of
api_version. This was causing issues in newer releases of OpenStack
where the value of api_version was reporting as something other than
"3", and the generated Ironic config tried to use the v2.0 Keystone API.

This patch removes the optional logic in the template for v2.0 and rely
on the global default just like templates/parts/section-placement does.

Closes-Bug: #1995778
Change-Id: I8e0270b933f9c8fb5d6a65f9ebb930a0b21fead8
This commit is contained in:
Jadon Naas 2023-06-22 12:40:04 -04:00 committed by Felipe Reyes
parent 3c53110282
commit 8d560b3ff5
1 changed files with 1 additions and 6 deletions

View File

@ -1,12 +1,7 @@
{% if virt_type == 'ironic' and auth_host and ironic_api_ready -%}
{% if api_version and api_version == "3" -%}
{% set auth_ver = "v3" -%}
{% else -%}
{% set auth_ver = "v2.0" -%}
{% endif -%}
[ironic]
auth_url = {{ auth_protocol }}://{{ auth_host }}:{{ auth_port }}
auth_type = password
auth_url = {{auth_protocol}}://{{auth_host}}:{{auth_port}}/{{auth_ver}}
project_name = {{ admin_tenant_name }}
username = {{ admin_user }}
password = {{ admin_password }}