From 6c7020c51ab2c42ec65f3e916c03f40ebeac2c4e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sat, 27 Jan 2024 20:53:19 +0900 Subject: [PATCH] Drop remaining references to eventlet options Because these were removed by [1]. Also update the previous release note to document the upgrade impact on catalog information (like endpoint urls) including string interpolations requiring these removed options. [1] 2a3c73c49b117fe43d2174dbdb55842a4407377d Change-Id: If78d0b93665410b86754ea35653ca9d4c15c81c5 --- etc/default_catalog.templates | 6 +++--- keystone/catalog/backends/templated.py | 6 +----- .../eventlet-cleanup-f35fc5f83c16ea1c.yaml | 10 ++++++++++ tools/sample_data.sh | 20 ++++++------------- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/etc/default_catalog.templates b/etc/default_catalog.templates index 77ab07e027..09dee53497 100644 --- a/etc/default_catalog.templates +++ b/etc/default_catalog.templates @@ -1,8 +1,8 @@ # config for templated.Catalog, using camelCase because I don't want to do # translations for keystone compat -catalog.RegionOne.identity.publicURL = http://localhost:$(public_port)s/v3 -catalog.RegionOne.identity.adminURL = http://localhost:$(admin_port)s/v3 -catalog.RegionOne.identity.internalURL = http://localhost:$(public_port)s/v3 +catalog.RegionOne.identity.publicURL = http://localhost:5000/v3 +catalog.RegionOne.identity.adminURL = http://localhost:5000/v3 +catalog.RegionOne.identity.internalURL = http://localhost:5000/v3 catalog.RegionOne.identity.name = Identity Service # fake compute service for now to help novaclient tests work diff --git a/keystone/catalog/backends/templated.py b/keystone/catalog/backends/templated.py index 5472b2fde9..64bfb630a2 100644 --- a/keystone/catalog/backends/templated.py +++ b/keystone/catalog/backends/templated.py @@ -61,11 +61,7 @@ class Catalog(base.CatalogDriverBase): catalog.$REGION.$SERVICE.$key = $value - and is stored in a similar looking hierarchy. Where a value can contain - values to be interpolated by standard python string interpolation that look - like (the % is replaced by a $): - - http://localhost:$(public_port)s/ + and is stored in a similar looking hierarchy. When expanding the template it will pass in a dict made up of the conf instance plus a few additional key-values, notably project_id and user_id. diff --git a/releasenotes/notes/eventlet-cleanup-f35fc5f83c16ea1c.yaml b/releasenotes/notes/eventlet-cleanup-f35fc5f83c16ea1c.yaml index a4330f9d5f..fe958f62ac 100644 --- a/releasenotes/notes/eventlet-cleanup-f35fc5f83c16ea1c.yaml +++ b/releasenotes/notes/eventlet-cleanup-f35fc5f83c16ea1c.yaml @@ -15,3 +15,13 @@ upgrade: - ``standard-threads`` - ``pydev-debug-host`` - ``pydev-debug-port`` + + - | + Keystone no longer substitute the following string interpolations in + catalog information. Replace string interpolations by hard-coded strings + before upgrade. + + - ``public_bind_host`` + - ``public_bind_port`` + - ``public_admin_host`` + - ``public_admin_port`` diff --git a/tools/sample_data.sh b/tools/sample_data.sh index 6dc5c41360..35fdec99fd 100755 --- a/tools/sample_data.sh +++ b/tools/sample_data.sh @@ -19,8 +19,7 @@ # This script is based on the original DevStack keystone_data.sh script. # # It demonstrates how to bootstrap Keystone with an administrative user -# using the `keystone-manage bootstrap` command. It will get the admin_port -# from keystone.conf if available. +# using the `keystone-manage bootstrap` command. # # Disable creation of endpoints by setting DISABLE_ENDPOINTS environment variable. # Use this with the Catalog Templated backend. @@ -55,6 +54,7 @@ NEUTRON_PASSWORD=${NEUTRON_PASSWORD:-${SERVICE_PASSWORD:-neutron}} CONTROLLER_PUBLIC_ADDRESS=${CONTROLLER_PUBLIC_ADDRESS:-localhost} CONTROLLER_ADMIN_ADDRESS=${CONTROLLER_ADMIN_ADDRESS:-localhost} CONTROLLER_INTERNAL_ADDRESS=${CONTROLLER_INTERNAL_ADDRESS:-localhost} +KEYSTONE_PORT=${KEYSTONE_PORT:-5000} TOOLS_DIR=$(cd $(dirname "$0") && pwd) KEYSTONE_CONF=${KEYSTONE_CONF:-/etc/keystone/keystone.conf} @@ -67,14 +67,6 @@ if [[ ! -r "$KEYSTONE_CONF" ]]; then fi fi -# Extract some info from Keystone's configuration file -if [[ -r "$KEYSTONE_CONF" ]]; then - CONFIG_ADMIN_PORT=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^admin_port= | cut -d'=' -f2) - if [[ -z "${CONFIG_ADMIN_PORT}" ]]; then - # default config options are commented out, so lets try those - CONFIG_ADMIN_PORT=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^\#admin_port= | cut -d'=' -f2) - fi -fi export OS_USERNAME=admin export OS_PASSWORD=$ADMIN_PASSWORD @@ -82,13 +74,13 @@ export OS_PROJECT_NAME=admin export OS_USER_DOMAIN_ID=default export OS_PROJECT_DOMAIN_ID=default export OS_IDENTITY_API_VERSION=3 -export OS_AUTH_URL=http://$CONTROLLER_PUBLIC_ADDRESS:${CONFIG_ADMIN_PORT:-5000}/v3 +export OS_AUTH_URL=http://$CONTROLLER_PUBLIC_ADDRESS:${KEYSTONE_PORT}/v3 export OS_BOOTSTRAP_PASSWORD=$ADMIN_PASSWORD export OS_BOOTSTRAP_REGION_ID=RegionOne -export OS_BOOTSTRAP_ADMIN_URL="http://$CONTROLLER_PUBLIC_ADDRESS:\$(public_port)s/v3" -export OS_BOOTSTRAP_PUBLIC_URL="http://$CONTROLLER_ADMIN_ADDRESS:\$(admin_port)s/v3" -export OS_BOOTSTRAP_INTERNAL_URL="http://$CONTROLLER_INTERNAL_ADDRESS:\$(public_port)s/v3" +export OS_BOOTSTRAP_ADMIN_URL="http://$CONTROLLER_PUBLIC_ADDRESS:${KEYSTONE_PORT}/v3" +export OS_BOOTSTRAP_PUBLIC_URL="http://$CONTROLLER_ADMIN_ADDRESS:${KEYSTONE_PORT}/v3" +export OS_BOOTSTRAP_INTERNAL_URL="http://$CONTROLLER_INTERNAL_ADDRESS:${KEYSTONE_PORT}/v3" keystone-manage bootstrap #