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
This commit is contained in:
Parsons, Cliff (cp769u) 2020-09-28 18:17:38 +00:00
parent aa26614df4
commit fc8d855a43
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ apiVersion: v1
appVersion: v1.0.0 appVersion: v1.0.0
description: OpenStack-Helm Helm-Toolkit description: OpenStack-Helm Helm-Toolkit
name: helm-toolkit name: helm-toolkit
version: 0.1.1 version: 0.1.2
home: https://docs.openstack.org/openstack-helm home: https://docs.openstack.org/openstack-helm
icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png icon: https://www.openstack.org/themes/openstack/images/project-mascots/OpenStack-Helm/OpenStack_Project_OpenStackHelm_vertical.png
sources: sources:

View File

@ -133,7 +133,7 @@ send_to_remote_server() {
echo $RESULT | grep $CONTAINER_NAME echo $RESULT | grep $CONTAINER_NAME
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
# Find the swift URL from the keystone endpoint list # 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 # Get a token from keystone
TOKEN=$(openstack token issue -f value -c id) TOKEN=$(openstack token issue -f value -c id)