Add config option swift-temp-url-duration

This config option allows operators to increase the duration of
temporary URLs handed to ironic-python-agent to download images when
using the 'direct' deployment interface[0].

The rendered file (ironic.conf) will only include
[glance].swift_temp_url_duration when it's overriden by the
operator, otherwise the upstream's default is used by omitting the key
defition.

[0] https://docs.openstack.org/ironic/latest/admin/interfaces/deploy.html#direct-deploy

Closes-Bug: #1997581
Change-Id: I6a4a582b199e5137a9e5fd185882acec20424f3a
This commit is contained in:
Felipe Reyes 2023-01-19 11:17:12 -03:00
parent e229f53873
commit 0cd0912668
5 changed files with 11 additions and 6 deletions

View File

@ -212,3 +212,11 @@ options:
type: int
description: |
Number of days before a log object expires in swift.
swift-temp-url-duration:
default:
type: int
description: |
The length of time (in seconds) that the temporary URL will be valid
for. Defaults to 20 minutes. If some deploys get a 401 response code
when trying to download from the temporary URL, try raising this
duration.

View File

@ -49,6 +49,9 @@ swift_container = glance
{% if options.temp_url_secret -%}
swift_temp_url_key = {{ options.temp_url_secret }}
{% endif %}
{%- if options.swift_temp_url_duration and options.swift_temp_url_duration > 0 %}
swift_temp_url_duration = {{ options.swift_temp_url_duration }}
{%- endif %}
[swift]
{% include "parts/service-auth" %}

View File

@ -162,8 +162,6 @@ services:
charm: ch:mysql-innodb-cluster
num_units: 3
constraints: mem=4G
options:
source: *source
channel: latest/edge
cinder:
charm: ch:cinder

View File

@ -162,8 +162,6 @@ services:
charm: ch:mysql-innodb-cluster
num_units: 3
constraints: mem=4G
options:
source: *source
channel: latest/edge
cinder:
charm: ch:cinder

View File

@ -162,8 +162,6 @@ services:
charm: ch:mysql-innodb-cluster
num_units: 3
constraints: mem=4G
options:
source: *source
channel: latest/edge
cinder:
charm: ch:cinder