From 988b74f0119b1d856d59207c65b377c20c1681cf Mon Sep 17 00:00:00 2001 From: Andrey Epifanov Date: Fri, 13 Feb 2015 11:13:10 +0300 Subject: [PATCH] Disable l3-agent resource using exec Due constraint problem with new pacemaker v2 Change-Id: I5ec5b21b86218b300f520ade1e860a3d57393bbc --- .../puppet/modules/vpnaas/manifests/common.pp | 2 +- .../puppet/modules/vpnaas/manifests/ha.pp | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/deployment_scripts/puppet/modules/vpnaas/manifests/common.pp b/deployment_scripts/puppet/modules/vpnaas/manifests/common.pp index b9a70fe..b3f8185 100644 --- a/deployment_scripts/puppet/modules/vpnaas/manifests/common.pp +++ b/deployment_scripts/puppet/modules/vpnaas/manifests/common.pp @@ -1,5 +1,5 @@ #This class contains common changes both for HA and simple deployment mode. -#It enables VPN tab in Horizon and setups Neutron server. +#It enables VPN in Horizon and Neutron server. class vpnaas::common { diff --git a/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp b/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp index 10ae9a6..c0905a6 100644 --- a/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp +++ b/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp @@ -37,16 +37,11 @@ class vpnaas::ha { enabled => false, } - service {'p_neutron-l3-agent': - enable => true, - ensure => stopped, - hasstatus => true, - hasrestart => true, - provider => 'pacemaker', + exec {'remove_p_neutron-l3-agent': + command => "pcs resource disable p_neutron-l3-agent --wait=30", + path => '/usr/sbin:/usr/bin:/sbin:/bin', } - Service['p_neutron-l3-agent'] -> Class['vpnaas::agent'] - $csr_metadata = undef $csr_complex_type = 'clone' $csr_ms_metadata = { 'interleave' => 'true' } @@ -90,9 +85,10 @@ class vpnaas::ha { command => "pcs resource show p_neutron-vpn-agent > /dev/null 2>&1", path => '/usr/sbin:/usr/bin:/sbin:/bin', } - Exec['waiting-for-vpn-agent'] -> Cluster::Corosync::Cs_service["vpn"] + Exec['waiting-for-vpn-agent'] -> Cluster::Corosync::Cs_service["vpn"] } + Exec['remove_p_neutron-l3-agent'] -> Cluster::Corosync::Cs_service["vpn"] File['q-agent-cleanup.py'] -> Cluster::Corosync::Cs_service["vpn"] File["${vpnaas::params::vpn_agent_ocf_file}"] -> Cluster::Corosync::Cs_service["vpn"] -> Cluster::Corosync::Cs_with_service['vpn-and-ovs'] -> Class['vpnaas::common']