Use admin_tenant_id as cinder internal tenant

admin_tenant_id is more explicit than admin_tenant_name
as project names might duplicate

Charm-helpers-pr: https://github.com/juju/charm-helpers/pull/861

Depends-on: I6807128492cb184de3ef5f454d0ea745246b242e

Closes-Bug: #2030755
Change-Id: Idbc2f3d12dcf325b4a53a3dda1ecfa75a199295a
(cherry picked from commit ff442694d2)
(cherry picked from commit 80115a2cb2)
(cherry picked from commit e979c91908)
This commit is contained in:
Erlon R. Cruz 2023-10-20 17:37:28 -03:00 committed by Nicolas Bock
parent 245a2e32d5
commit 73d596bb9e
3 changed files with 6 additions and 4 deletions

View File

@ -525,6 +525,7 @@ class IdentityServiceContext(OSContextGenerator):
if float(api_version) > 2:
ctxt.update({
'admin_domain_name': _resolve('service_domain'),
'service_user_id': _resolve('service_user_id'),
'service_project_id': _resolve('service_tenant_id'),
'service_domain_id': _resolve('service_domain_id')})
@ -557,6 +558,7 @@ class IdentityServiceContext(OSContextGenerator):
# NOTE(jamespage) this is required for >= icehouse
# so a missing value just indicates keystone needs
# upgrading
ctxt['admin_user_id'] = _resolve('service_user_id')
ctxt['admin_tenant_id'] = _resolve('service_tenant_id')
ctxt['admin_domain_id'] = _resolve('service_domain_id')
return ctxt

View File

@ -51,8 +51,8 @@ os_region_name = {{ region }}
volume_usage_audit_period = {{ volume_usage_audit_period }}
{% if auth_host -%}
cinder_internal_tenant_project_id = {{ admin_tenant_name }}
cinder_internal_tenant_user_id = {{ admin_user }}
cinder_internal_tenant_project_id = {{ admin_tenant_id }}
cinder_internal_tenant_user_id = {{ admin_user_id }}
{% endif -%}
{% include "parts/backends" %}

View File

@ -51,8 +51,8 @@ os_region_name = {{ region }}
volume_usage_audit_period = {{ volume_usage_audit_period }}
{% if auth_host -%}
cinder_internal_tenant_project_id = {{ admin_tenant_name }}
cinder_internal_tenant_user_id = {{ admin_user }}
cinder_internal_tenant_project_id = {{ admin_tenant_id }}
cinder_internal_tenant_user_id = {{ admin_user_id }}
{% endif -%}
{% include "parts/backends" %}