From 336516092314955dd67715f857f9a01188aba023 Mon Sep 17 00:00:00 2001 From: tsurendra Date: Tue, 17 Feb 2015 13:09:34 -0800 Subject: [PATCH] Partial-Bug: #1413364 Server Manager HA, configuration for mysql , nova , haproxy were different from fab provisioning Ha-mon was being started only on openstack[0], Have done changes to make it start on openstack nodes after provision is complete. Testing: Provisoned and tested that ha-mon is started on all nodes. Change-Id: I70f3f0d5cefc6c84190eb0b8296bb87df88677bc --- .../modules/contrail/manifests/ha_config.pp | 9 --------- .../modules/contrail/manifests/provision_complete.pp | 11 +++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/contrail/environment/modules/contrail/manifests/ha_config.pp b/contrail/environment/modules/contrail/manifests/ha_config.pp index 759404de..aa7de9f4 100644 --- a/contrail/environment/modules/contrail/manifests/ha_config.pp +++ b/contrail/environment/modules/contrail/manifests/ha_config.pp @@ -205,15 +205,6 @@ provider => shell, logoutput => 'true', } - -> - exec { "ha-mon-restart": - command => "service contrail-hamon restart && echo contrail-ha-mon >> /etc/contrail/contrail_openstack_exec.out", - provider => shell, - logoutput => "true", - unless => "grep -qx contrail-ha-mon /etc/contrail/contrail_openstack_exec.out", - # require => File["/opt/contrail/bin/transfer_keys.py"] - } - } diff --git a/contrail/environment/modules/contrail/manifests/provision_complete.pp b/contrail/environment/modules/contrail/manifests/provision_complete.pp index d46d8260..3a54888c 100644 --- a/contrail/environment/modules/contrail/manifests/provision_complete.pp +++ b/contrail/environment/modules/contrail/manifests/provision_complete.pp @@ -4,6 +4,8 @@ { $host_control_ip = $::contrail::params::host_ip $openstack_ip_list = $::contrail::params::openstack_ip_list + $internal_vip = $::contrail::params::internal_vip + contrail::lib::report_status { $state: state => $state } if ($host_control_ip in $openstack_ip_list) { @@ -21,6 +23,15 @@ logoutput => 'true' } + #Make ha-mon start later + if($internal_vip != "") { + exec { "ha-mon-restart": + command => "service contrail-hamon restart && echo contrail-ha-mon >> /etc/contrail/contrail_openstack_exec.out", + provider => shell, + logoutput => "true", + unless => "grep -qx contrail-ha-mon /etc/contrail/contrail_openstack_exec.out", + } + } }