From ca610036b2ca542426bc1c06eaec1543ebc8b967 Mon Sep 17 00:00:00 2001 From: Olivier Bourdon Date: Tue, 10 Jan 2017 08:32:02 +0100 Subject: [PATCH] Fix issue where VIP becomes unavailable after Controller reboot Use a dedicated network namespace (zabbix) for the Zabbix VIP Change-Id: I70486093cb2c1009fd6a8602c5cebadeb1c3e6f6 Closes-Bug: #1644821 --- .../puppet/modules/plugin_zabbix/files/zabbix-server.ocf | 2 +- .../puppet/modules/plugin_zabbix/manifests/params.pp | 5 +++-- network_roles.yaml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf b/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf index 9029d9e..59d1469 100644 --- a/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf +++ b/deployment_scripts/puppet/modules/plugin_zabbix/files/zabbix-server.ocf @@ -45,7 +45,7 @@ SERVICE_NAME="Zabbix-server" OCF_RESKEY_binary_default="/usr/sbin/zabbix_server" OCF_RESKEY_pid_default="/var/run/zabbix/zabbix_server.pid" -OCF_RESKEY_namespace_default="haproxy" +OCF_RESKEY_namespace_default="zabbix" : ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}} : ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}} diff --git a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp index d8655ee..102303a 100644 --- a/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp +++ b/deployment_scripts/puppet/modules/plugin_zabbix/manifests/params.pp @@ -116,6 +116,7 @@ class plugin_zabbix::params { #server parameters $vip_name = 'zbx_vip_mgmt' $server_ip = $network_metadata['vips'][$vip_name]['ipaddr'] + $server_public_ip = $network_metadata['vips']['public']['ipaddr'] $mgmt_vip = $network_metadata['vips']['management']['ipaddr'] $server_config = "${zabbix_base_conf_dir}/zabbix_server.conf" $server_config_template = 'plugin_zabbix/zabbix_server.conf.erb' @@ -174,9 +175,9 @@ class plugin_zabbix::params { #api if $ssl[horizon] == true { - $api_url = "https://${server_ip}${frontend_base}/api_jsonrpc.php" + $api_url = "https://${server_public_ip}${frontend_base}/api_jsonrpc.php" }else{ - $api_url = "http://${server_ip}${frontend_base}/api_jsonrpc.php" + $api_url = "http://${server_public_ip}${frontend_base}/api_jsonrpc.php" } $api_hash = { endpoint => $api_url, diff --git a/network_roles.yaml b/network_roles.yaml index caef494..ff1fca5 100644 --- a/network_roles.yaml +++ b/network_roles.yaml @@ -5,4 +5,4 @@ gateway: false vip: - name: "zbx_vip_mgmt" - namespace: "haproxy" + namespace: "zabbix"