From fc8d855a439226878bc3bc07e4d117d72ae89993 Mon Sep 17 00:00:00 2001 From: "Parsons, Cliff (cp769u)" Date: Mon, 28 Sep 2020 18:17:38 +0000 Subject: [PATCH] Make database backups work with openstack Train This PS fixes a problem with the main backup script in the helm-toolkit, which tries to create a swift container using the SWIFT_URL. The problem is that the SWIFT_URL is malformed because the call to openstack get catalog list has a different format in Train than it did in Stein. So a solution that works for both Train and Stein is needed. This patch will use openstack catalog show instead and will extract the public URL from that output. Change-Id: Ic326b0b4717951525e6b17ab015577f28e1d321a --- helm-toolkit/Chart.yaml | 2 +- .../templates/scripts/db-backup-restore/_backup_main.sh.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helm-toolkit/Chart.yaml b/helm-toolkit/Chart.yaml index 214cbb7af..90c038094 100644 --- a/helm-toolkit/Chart.yaml +++ b/helm-toolkit/Chart.yaml @@ -15,7 +15,7 @@ apiVersion: v1 appVersion: v1.0.0 description: OpenStack-Helm Helm-Toolkit name: helm-toolkit -version: 0.1.1 +version: 0.1.2 home: https://docs.openstack.org/openstack-helm icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png sources: diff --git a/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl b/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl index a3105cda7..800f0b5b5 100755 --- a/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl +++ b/helm-toolkit/templates/scripts/db-backup-restore/_backup_main.sh.tpl @@ -133,7 +133,7 @@ send_to_remote_server() { echo $RESULT | grep $CONTAINER_NAME if [[ $? -ne 0 ]]; then # Find the swift URL from the keystone endpoint list - SWIFT_URL=$(openstack catalog list -f value | grep swift | grep public | awk '{print $2}') + SWIFT_URL=$(openstack catalog show object-store -c endpoints | grep public | awk '{print $4}') # Get a token from keystone TOKEN=$(openstack token issue -f value -c id)