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 appVersion: v1.0.0
description: OpenStack-Helm Keystone description: OpenStack-Helm Keystone
name: keystone name: keystone
version: 0.3.5 version: 0.3.6
home: https://docs.openstack.org/keystone/latest/ home: https://docs.openstack.org/keystone/latest/
icon: https://www.openstack.org/themes/openstack/images/project-mascots/Keystone/OpenStack_Project_Keystone_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/Keystone/OpenStack_Project_Keystone_vertical.png
sources: sources:

View File

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

View File

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