From 91e4aea4511b5d6afa21d18a84ef486097d4f542 Mon Sep 17 00:00:00 2001 From: Alex Kavanagh Date: Mon, 11 Apr 2022 18:57:17 +0100 Subject: [PATCH] Fix the trailing-slash issue on for product-streams endpoint ceph-radosgw is now more strict and can't handle non-canonical paths in http requests; this patch stopes that happening, and ensures that the endpoint is set without a trailing slash. Change-Id: I1c2de2aad2f7652906d91865e5e214b403d2a37b --- files/glance_simplestreams_sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/glance_simplestreams_sync.py b/files/glance_simplestreams_sync.py index 3108884..6869c0a 100755 --- a/files/glance_simplestreams_sync.py +++ b/files/glance_simplestreams_sync.py @@ -81,7 +81,7 @@ SYNC_RUNNING_FLAG_FILE_NAME = os.path.join(PID_FILE_DIR, # juju looks in simplestreams/data/* in swift to figure out which # images to deploy, so this path isn't really configurable even though # it is. -SWIFT_DATA_DIR = 'simplestreams/data/' +SWIFT_DATA_DIR = 'simplestreams/data' # When running local apache for product-streams use path to place indexes. APACHE_DATA_DIR = '/var/www/html' @@ -278,7 +278,7 @@ def do_sync(ksc, charm_conf): if charm_conf['use_swift']: sync_command += [ '--output-swift', - SWIFT_DATA_DIR + "{}/".format(SWIFT_DATA_DIR) ] else: # For debugging purposes only.