diff --git a/deployment_scripts/puppet/modules/vpnaas/files/ocf/neutron-agent-vpn b/deployment_scripts/puppet/modules/vpnaas/files/ocf/ocf-neutron-vpn-agent similarity index 97% rename from deployment_scripts/puppet/modules/vpnaas/files/ocf/neutron-agent-vpn rename to deployment_scripts/puppet/modules/vpnaas/files/ocf/ocf-neutron-vpn-agent index c5d1fab..842162f 100644 --- a/deployment_scripts/puppet/modules/vpnaas/files/ocf/neutron-agent-vpn +++ b/deployment_scripts/puppet/modules/vpnaas/files/ocf/ocf-neutron-vpn-agent @@ -285,7 +285,16 @@ END } get_worker_pid() { - pid=`pgrep -u ${OCF_RESKEY_user} -fol ${OCF_RESKEY_binary} | grep -E "python\s+\/usr\/bin" | awk '{print $1}'` + local options + local pid + # FIXME: Remove if condition and set 'falo' statically once Fuel + # discontinue support of Ubuntu 12.04 and CentOs 6.x where -a was not defined. + if pgrep -V | awk 'match($0, /[0-9]\.[0-9].*/) {if (substr($0, RSTART, RLENGTH) < 3.3) {exit 1}}'; then + options='falo' + else + options='flo' + fi + pid=`pgrep -u ${OCF_RESKEY_user} -${options} ${OCF_RESKEY_binary} | awk '/python \/usr\/bin/ {print $1}'` echo $pid } diff --git a/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp b/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp index f83d7c5..36acfd1 100644 --- a/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp +++ b/deployment_scripts/puppet/modules/vpnaas/manifests/ha.pp @@ -24,7 +24,7 @@ class vpnaas::ha { mode => '0644', owner => root, group => root, - source => 'puppet:///modules/vpnaas/ocf/neutron-agent-vpn' + source => 'puppet:///modules/vpnaas/ocf/ocf-neutron-vpn-agent' } class {'vpnaas::common':} @@ -49,7 +49,7 @@ class vpnaas::ha { } cluster::corosync::cs_service {'vpn': - ocf_script => 'neutron-agent-vpn', + ocf_script => 'ocf-neutron-vpn-agent', csr_parameters => { 'debug' => $debug, 'syslog' => $syslog, diff --git a/deployment_scripts/puppet/modules/vpnaas/manifests/params.pp b/deployment_scripts/puppet/modules/vpnaas/manifests/params.pp index d60ea6b..f700dfd 100644 --- a/deployment_scripts/puppet/modules/vpnaas/manifests/params.pp +++ b/deployment_scripts/puppet/modules/vpnaas/manifests/params.pp @@ -34,6 +34,6 @@ class vpnaas::params { $openswan_package = 'openswan' - $vpn_agent_ocf_file = '/etc/puppet/modules/cluster/files/ocf/neutron-agent-vpn' + $vpn_agent_ocf_file = '/etc/puppet/modules/cluster/files/ocf/ocf-neutron-vpn-agent' $cleanup_script_file = '/etc/puppet/modules/cluster/files/q-agent-cleanup.py' }