From c3d1432c719f998045d1911b2cd14a77fd15b79a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 26 Jan 2023 01:45:56 +0900 Subject: [PATCH] Ensure haproxy::balancemember::ports is a string The recent change[1] in puppetlabs-haproxy introduced data type check and now the ports parameter accept only string or array of strings and no longer accepts an integer. This ensures the value is converted to avoid validation errors. [1] https://github.com/puppetlabs/puppetlabs-haproxy/commit/95ca912f77966ed0da7a5bec9265cdacbf09da4c Closes-Bug: #2003882 Change-Id: I65720576249f2242331e38762dd0d5860d74de9d --- manifests/haproxy/endpoint.pp | 4 ++-- manifests/haproxy/horizon_endpoint.pp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/haproxy/endpoint.pp b/manifests/haproxy/endpoint.pp index a339f084f..fcc2090b8 100644 --- a/manifests/haproxy/endpoint.pp +++ b/manifests/haproxy/endpoint.pp @@ -303,7 +303,7 @@ define tripleo::haproxy::endpoint ( $non_colon_ip = regsubst($ip, ':', '-', 'G') haproxy::balancermember { "${name}_${non_colon_ip}_${server}": listening_service => $listening_service, - ports => $service_port_real, + ports => "${service_port_real}", ipaddresses => $ip, server_names => $server, options => union($member_options, ["cookie ${server}"]), @@ -312,7 +312,7 @@ define tripleo::haproxy::endpoint ( } else { haproxy::balancermember { "${name}": listening_service => $listening_service, - ports => $service_port_real, + ports => "${service_port_real}", ipaddresses => $ip_addresses_real, server_names => $server_names_real, options => $member_options, diff --git a/manifests/haproxy/horizon_endpoint.pp b/manifests/haproxy/horizon_endpoint.pp index de5a54047..b82cbfcda 100644 --- a/manifests/haproxy/horizon_endpoint.pp +++ b/manifests/haproxy/horizon_endpoint.pp @@ -202,7 +202,7 @@ class tripleo::haproxy::horizon_endpoint ( $non_colon_ip = regsubst($ip, ':', '-', 'G') haproxy::balancermember { "horizon_${non_colon_ip}_${server}": listening_service => 'horizon_be', - ports => $backend_port, + ports => "${$backend_port}", ipaddresses => $ip, server_names => $server, options => union($member_options, ["cookie ${server}"]),