From 7a7a4c48dba221ec22e4bd94146a33d031f51789 Mon Sep 17 00:00:00 2001 From: Aleksandr Didenko Date: Mon, 5 Sep 2016 10:31:24 +0200 Subject: [PATCH] Disable haproxy-vip colocation We no longer need it since haproxy service does not migrate along with VIPs, it's running on all needed roles. Change-Id: I217b13391d10376e5c658b59c5aa3ee8df7c8d2c --- .../puppet/manifests/add_to_hiera.pp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/deployment_scripts/puppet/manifests/add_to_hiera.pp b/deployment_scripts/puppet/manifests/add_to_hiera.pp index 64999c7..4699e07 100644 --- a/deployment_scripts/puppet/manifests/add_to_hiera.pp +++ b/deployment_scripts/puppet/manifests/add_to_hiera.pp @@ -14,6 +14,14 @@ if roles_include($haproxy_roles){ $haproxy = false } +# Since fuel-library saves database_vip in globals.yaml we need to calulate +# this VIP value here in order to not conflict with detach-database plugin. +$detach_database_plugin = hiera('detach-database', {}) +$detach_database_yaml = pick($detach_database_plugin['yaml_additional_config'], "{}") +$detach_database_settings_hash = parseyaml($detach_database_yaml) +$database_vip = pick($detach_database_settings_hash['remote_database'], + try_get_value($vips, 'database/ipaddr', $mgmt_ip)) + file {"/etc/hiera/plugins/${plugin_name}.yaml": ensure => file, content => inline_template("# Created by puppet, please do not edit manually @@ -44,6 +52,10 @@ corosync_roles: <%= @haproxy_roles %> colocate_haproxy: false <% end -%> run_ping_checker: false +colocate_haproxy: false +service_endpoint: <%= @mgmt_ip %> +management_vip: <%= @mgmt_ip %> +public_vip: <%= @public_ip %> +database_vip: <%= @database_vip %> ") } -