From bfc59e93823f4c26aa74ab1bd36c0927c777333e Mon Sep 17 00:00:00 2001 From: Martin Schuppert Date: Tue, 2 Apr 2019 11:50:23 +0200 Subject: [PATCH] Use cell information for mysql and novncproxy haproxy proxies In case of a multicell deployment the mysql and nova novncproxy backend servers need to use the SERVICE_cell_node_names. Also the novncproxy did use the nova_api_vip and nova_api_node_[ips|names] information insteand of nova_vnc_proxy_vip and nova_vnc_proxy_node_[ips|names] Change-Id: I606d1187a442c6ef6327a7503b6b5f0832cbb872 Related-Bug: #1822607 --- manifests/haproxy.pp | 19 +++++++++++++++---- ...xy_cell_server_names-5cc0e81836d568b7.yaml | 7 +++++++ 2 files changed, 22 insertions(+), 4 deletions(-) create mode 100644 releasenotes/notes/haproxy_cell_server_names-5cc0e81836d568b7.yaml diff --git a/manifests/haproxy.pp b/manifests/haproxy.pp index 61bbf064d..eec3b427d 100644 --- a/manifests/haproxy.pp +++ b/manifests/haproxy.pp @@ -1070,6 +1070,7 @@ class tripleo::haproxy ( } } + $nova_vnc_proxy_vip = hiera('nova_vnc_proxy_vip', $controller_virtual_ip) if $nova_novncproxy { if $enable_internal_tls { # we need to make sure we use ssl for checks. @@ -1079,12 +1080,17 @@ class tripleo::haproxy ( $haproxy_member_options_real = $haproxy_member_options $novncproxy_ssl_member_options = [] } + if hiera('nova_is_additional_cell', undef) { + $novncproxy_server_names_real = hiera('nova_vnc_proxy_cell_node_names', $controller_hosts_names_real) + } else { + $novncproxy_server_names_real = hiera('nova_vnc_proxy_node_names', $controller_hosts_names_real) + } ::tripleo::haproxy::endpoint { 'nova_novncproxy': public_virtual_ip => $public_virtual_ip, - internal_ip => $nova_api_vip, + internal_ip => $nova_vnc_proxy_vip, service_port => $ports[nova_novnc_port], - ip_addresses => hiera('nova_api_node_ips', $controller_hosts_real), - server_names => hiera('nova_api_node_names', $controller_hosts_names_real), + ip_addresses => hiera('nova_vnc_proxy_node_ips', $controller_hosts_real), + server_names => $novncproxy_server_names_real, listen_options => merge($default_listen_options, { 'option' => [ 'tcpka', 'tcplog' ], 'balance' => 'source', @@ -1343,6 +1349,11 @@ class tripleo::haproxy ( } if $mysql { + if hiera('nova_is_additional_cell', undef) { + $mysql_server_names_real = hiera('mysql_cell_node_names', $controller_hosts_names_real) + } else { + $mysql_server_names_real = hiera('mysql_node_names', $controller_hosts_names_real) + } haproxy::listen { 'mysql': bind => $mysql_bind_opts, options => $mysql_listen_options, @@ -1352,7 +1363,7 @@ class tripleo::haproxy ( listening_service => 'mysql', ports => '3306', ipaddresses => hiera('mysql_node_ips', $controller_hosts_real), - server_names => hiera('mysql_node_names', $controller_hosts_names_real), + server_names => $mysql_server_names_real, options => $mysql_member_options_real, } if $manage_firewall { diff --git a/releasenotes/notes/haproxy_cell_server_names-5cc0e81836d568b7.yaml b/releasenotes/notes/haproxy_cell_server_names-5cc0e81836d568b7.yaml new file mode 100644 index 000000000..1d81f44e6 --- /dev/null +++ b/releasenotes/notes/haproxy_cell_server_names-5cc0e81836d568b7.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + In case of a multicell deployment the mysql and nova novncproxy backend + servers need to use the SERVICE_cell_node_names. + Also the novncproxy did use the nova_api_vip and nova_api_node_[ips|names] + information insteand of nova_vnc_proxy_vip and nova_vnc_proxy_node_[ips|names]