Enclose Barbican API host into square brackets in case of IPv6

Barbican fails to start in case of IPv6 configuration:
"Error: ':2:9311' is not a valid port number."
Wrong parsing of IPv6 host address can be fixed by adding [].
Also dropping '' for API workers number for the sake of consistency.

Change-Id: Ie40a0338d202dfa1cc17810db56d902b14e5accf
Closes-Bug: 1810558
Signed-off-by: Alex Kozyrev <alex.kozyrev@windriver.com>
This commit is contained in:
Alex Kozyrev 2019-01-10 12:48:01 -05:00
parent 949bab37d7
commit 8fa6f8cf80
2 changed files with 6 additions and 3 deletions

View File

@ -1,2 +1,2 @@
SRC_DIR="src"
TIS_PATCH_VER=75
TIS_PATCH_VER=76

View File

@ -91,13 +91,16 @@ class openstack::barbican::api
file_line { 'Modify workers in gunicorn-config.py':
path => '/etc/barbican/gunicorn-config.py',
line => "workers = '${api_workers}'",
line => "workers = ${api_workers}",
match => '.*workers = .*',
tag => 'modify-workers',
}
include ::platform::network::mgmt::params
$api_host = $::platform::network::mgmt::params::controller_address
$api_host = $::platform::network::mgmt::params::subnet_version ? {
6 => "[${::platform::network::mgmt::params::controller_address}]",
default => $::platform::network::mgmt::params::controller_address,
}
$api_fqdn = $::platform::params::controller_hostname
$url_host = "http://${api_fqdn}:${api_port}"