Minor fixes for VPNaaS plugin

- remove CentOS from releases
- removed simple mode support
- moved vpn agent switching off script to a separate file
- remove vpn agent along with l3 during plugin deployment to resolve cluster
  downscaling issues

Change-Id: I8663169eaf85bba08db919dc1fccfc6549baa00d
This commit is contained in:
Sergey Kolekonov 2015-12-15 16:14:10 +03:00
parent db78076e69
commit d067794780
6 changed files with 15 additions and 45 deletions

View File

@ -0,0 +1,5 @@
#!/bin/bash
if [ -n "$(which pcs 2>/dev/null)" -a -n "$(pcs resource show p_neutron-vpn-agent 2>/dev/null)" ]; then
pcs resource disable p_neutron-vpn-agent --wait=60
fi

View File

@ -44,7 +44,13 @@ class vpnaas::ha {
onlyif => 'pcs resource show p_neutron-l3-agent 2>&1 > /dev/null',
path => '/usr/sbin:/usr/bin:/sbin:/bin',
}
Exec['remove_p_neutron-l3-agent'] -> Cluster::Corosync::Cs_service['vpn']
exec {'remove_p_neutron-vpn-agent':
command => 'pcs resource delete p_neutron-vpn-agent --wait=60',
onlyif => 'pcs resource show p_neutron-vpn-agent 2>&1 > /dev/null',
path => '/usr/sbin:/usr/bin:/sbin:/bin',
}
Exec['remove_p_neutron-l3-agent'] -> Cluster::Corosync::Cs_service['vpn']
Exec['remove_p_neutron-vpn-agent'] -> Cluster::Corosync::Cs_service['vpn']
}
$csr_metadata = undef

View File

@ -20,9 +20,5 @@
class vpnaas {
if $cluster_mode == 'ha_compact' {
include vpnaas::ha
} else {
include vpnaas::simple
}
include vpnaas::ha
}

View File

@ -1,32 +0,0 @@
# Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# == Class: vpnaas::simple
#
# This class deploys VPNaaS in simple mode.
#
class vpnaas::simple {
class {'vpnaas::agent':}
class {'vpnaas::common':}
service { 'disable-neutron-l3-service':
ensure => stopped,
name => 'neutron-l3-agent',
enable => false,
}
Service['disable-neutron-l3-service'] -> Class['vpnaas::agent'] -> Class['vpnaas::common']
}

View File

@ -21,14 +21,9 @@ groups: ['network']
releases:
- os: ubuntu
version: 2015.1-7.0
mode: ['ha', 'multinode']
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu
- os: centos
version: 2015.1-7.0
mode: ['ha', 'multinode']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/centos
# Version of plugin package
package_version: '2.0.0'

View File

@ -18,5 +18,5 @@
stage: pre_deployment
type: shell
parameters:
cmd: if [ -n "$(which pcs 2>/dev/null)" -a -n "$(pcs resource show p_neutron-vpn-agent 2>/dev/null)" ]; then pcs resource delete p_neutron-vpn-agent --wait=60; fi
cmd: ./disable_vpn_agent.sh
timeout: 90