From 88688f9199d8a7de8491bf4a5ffd3eb80b36a26f Mon Sep 17 00:00:00 2001 From: "Keonwoo.kim" Date: Fri, 10 Nov 2023 01:15:47 +0900 Subject: [PATCH] Use --region option to prevent OS_SWIFT_ENDPOINT_PREFIX is broken in storage-init.sh If there are multi regions, OS_SWIFT_ENDPOINT_PREFIX has broken url. To prevent this problem, use --region option. story: 2010964 task: 49071 Change-Id: I1bbd76616ab9c9ec7a8554c7f382642b2dbe0661 --- glance/Chart.yaml | 2 +- glance/templates/bin/_storage-init.sh.tpl | 2 +- releasenotes/notes/glance.yaml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/glance/Chart.yaml b/glance/Chart.yaml index 48778395e4..4c2c87f46c 100644 --- a/glance/Chart.yaml +++ b/glance/Chart.yaml @@ -14,7 +14,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Glance name: glance -version: 0.4.15 +version: 0.4.16 home: https://docs.openstack.org/glance/latest/ icon: https://www.openstack.org/themes/openstack/images/project-mascots/Glance/OpenStack_Project_Glance_vertical.png sources: diff --git a/glance/templates/bin/_storage-init.sh.tpl b/glance/templates/bin/_storage-init.sh.tpl index 0d291fd29a..2ce3b19378 100644 --- a/glance/templates/bin/_storage-init.sh.tpl +++ b/glance/templates/bin/_storage-init.sh.tpl @@ -36,7 +36,7 @@ elif [ "x$STORAGE_BACKEND" == "xswift" ]; then : ${OS_INTERFACE:="internal"} OS_TOKEN="$(openstack token issue -f value -c id)" OS_PROJECT_ID="$(openstack project show service -f value -c id)" - OS_SWIFT_ENDPOINT_PREFIX="$(openstack endpoint list --service swift --interface ${OS_INTERFACE} -f value -c URL | awk -F '$' '{ print $1 }')" + OS_SWIFT_ENDPOINT_PREFIX="$(openstack endpoint list --service swift --interface ${OS_INTERFACE} --region ${OS_REGION_NAME} -f value -c URL | awk -F '$' '{ print $1 }')" OS_SWIFT_SCOPED_ENDPOINT="${OS_SWIFT_ENDPOINT_PREFIX}${OS_PROJECT_ID}" curl --fail -i -X POST "${OS_SWIFT_SCOPED_ENDPOINT}" \ -H "X-Auth-Token: ${OS_TOKEN}" \ diff --git a/releasenotes/notes/glance.yaml b/releasenotes/notes/glance.yaml index e5879c2321..ccaaab03f1 100644 --- a/releasenotes/notes/glance.yaml +++ b/releasenotes/notes/glance.yaml @@ -49,4 +49,5 @@ glance: - 0.4.13 Add Ubuntu Jammy overrides - 0.4.14 Bump Cirros version to 0.6.2 - 0.4.15 Add 2023.2 Ubuntu Jammy overrides + - 0.4.16 Use --region option to prevent OS_SWIFT_ENDPOINT_PREFIX is broken in storage-init.sh ...