summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Tantsur <dtantsur@protonmail.com>2021-02-24 13:32:44 +0100
committerDmitry Tantsur <dtantsur@protonmail.com>2021-02-24 17:28:57 +0100
commita1f596590235d7b76be1d6184a2f6d44857f5eb0 (patch)
tree7d15d9958df2dfbb7912fdb7c2d2f2b78a487d05
parentdea33cbaf3d9de8d5384597c723d85d8ed3aad2e (diff)
downloadironic-a1f596590235d7b76be1d6184a2f6d44857f5eb0.tar.gz
Enable swift temporary URLs in grenade and provide a good error message
The fixed configdrive_use_object_store requires them. Change-Id: Ie7323ae107c7f801be010353c7c4f3b8a43c3a1a (cherry picked from commit 5533077c7d3c7afafe365173476e5580ea4b4ba0)
-rw-r--r--ironic/common/swift.py7
-rw-r--r--zuul.d/ironic-jobs.yaml2
2 files changed, 8 insertions, 1 deletions
diff --git a/ironic/common/swift.py b/ironic/common/swift.py
index 7340912d6..8a98c32d2 100644
--- a/ironic/common/swift.py
+++ b/ironic/common/swift.py
@@ -131,7 +131,12 @@ class SwiftAPI(object):
parse_result = urlparse.urlparse(self.connection.url)
swift_object_path = '/'.join((parse_result.path, container, obj))
- temp_url_key = account_info['x-account-meta-temp-url-key']
+ temp_url_key = account_info.get('x-account-meta-temp-url-key')
+ if not temp_url_key:
+ raise exception.MissingParameterValue(_(
+ 'Swift temporary URLs require a shared secret to be '
+ 'created. You must provide pre-generate the key on '
+ 'the project used to access Swift.'))
url_path = swift_utils.generate_temp_url(swift_object_path, timeout,
temp_url_key, 'GET')
return urlparse.urlunparse(
diff --git a/zuul.d/ironic-jobs.yaml b/zuul.d/ironic-jobs.yaml
index d61a3405a..3508e4de0 100644
--- a/zuul.d/ironic-jobs.yaml
+++ b/zuul.d/ironic-jobs.yaml
@@ -788,6 +788,8 @@
IRONIC_AUTOMATED_CLEAN_ENABLED: False
Q_AGENT: openvswitch
Q_ML2_TENANT_NETWORK_TYPE: vxlan
+ SWIFT_ENABLE_TEMPURLS: True
+ SWIFT_TEMPURL_KEY: secretkey
EBTABLES_RACE_FIX: True
LIBVIRT_STORAGE_POOL_PATH: /opt/libvirt/images
old: