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", + } + } }