Merge "Use region option in keystone endpoint-update.py"

This commit is contained in:
Zuul 2023-11-15 23:05:22 +00:00 committed by Gerrit Code Review
commit 41d046c1b5
3 changed files with 14 additions and 7 deletions

View File

@ -14,7 +14,7 @@ apiVersion: v1
appVersion: v1.0.0
description: OpenStack-Helm Keystone
name: keystone
version: 0.3.5
version: 0.3.6
home: https://docs.openstack.org/keystone/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Keystone/OpenStack_Project_Keystone_vertical.png
sources:

View File

@ -68,10 +68,12 @@ except:
# Set Internal Endpoint
try:
endpoint_url = os.environ['OS_BOOTSTRAP_INTERNAL_URL']
region_id = os.environ['OS_REGION_NAME']
cmd = ("update endpoint set url = %s where interface ='internal' and "
"service_id = (select id from service where "
"service.type = 'identity')")
user_engine.execute(cmd, (endpoint_url,))
"service.type = 'identity') and "
"region_id = %s")
user_engine.execute(cmd, (endpoint_url,region_id))
except:
logger.critical("Could not update internal endpoint")
raise
@ -79,10 +81,12 @@ except:
# Set Admin Endpoint
try:
endpoint_url = os.environ['OS_BOOTSTRAP_ADMIN_URL']
region_id = os.environ['OS_REGION_NAME']
cmd = ("update endpoint set url = %s where interface ='admin' "
"and service_id = (select id from service where "
"service.type = 'identity')")
user_engine.execute(cmd, (endpoint_url,))
"service.type = 'identity') "
"and region_id = %s")
user_engine.execute(cmd, (endpoint_url,region_id))
except:
logger.critical("Could not update admin endpoint")
raise
@ -90,10 +94,12 @@ except:
# Set Public Endpoint
try:
endpoint_url = os.environ['OS_BOOTSTRAP_PUBLIC_URL']
region_id = os.environ['OS_REGION_NAME']
cmd = ("update endpoint set url = %s where interface ='public' "
"and service_id = (select id from service where "
"service.type = 'identity')")
user_engine.execute(cmd, (endpoint_url,))
"service.type = 'identity') "
"and region_id = %s")
user_engine.execute(cmd, (endpoint_url,region_id))
except:
logger.critical("Could not update public endpoint")
raise

View File

@ -52,4 +52,5 @@ keystone:
- 0.3.3 Add 2023.1 overrides
- 0.3.4 Add Ubuntu Jammy overrides
- 0.3.5 Add 2023.2 Ubuntu Jammy overrides
- 0.3.6 Use region option in keystone endpoint-update.py
...