Merge "Add timeout for secondary controllers and fix dependency"

This commit is contained in:
Jenkins 2015-02-04 16:05:01 +00:00 committed by Gerrit Code Review
commit 1387fd56b8
3 changed files with 34 additions and 22 deletions

View File

@ -20,7 +20,7 @@ class vpnaas::common {
enable => true,
}
exec { "enable_vpnaas_dashboard":
exec {'enable_vpnaas_dashboard':
command => "/bin/sed -i \"s/'enable_vpn': False/'enable_vpn': True/\" $vpnaas::params::dashboard_settings",
unless => "/bin/egrep \"'enable_vpn': True\" $vpnaas::params::dashboard_settings",
}
@ -36,6 +36,6 @@ class vpnaas::common {
value => 'plugin.VPNDriverPlugin',
}
Exec['enable_vpnaas_dashboard'] -> Ini_subsetting['add_vpnaas_service_plugin'] ~>
Service[$vpnaas::params::server_service] ~> Service[$vpnaas::params::dashboard_service]
Exec['enable_vpnaas_dashboard'] ~> Service[$vpnaas::params::dashboard_service]
Ini_subsetting['add_vpnaas_service_plugin'] ~> Service[$vpnaas::params::server_service]
}

View File

@ -81,6 +81,18 @@ class vpnaas::ha {
hasrestart => false,
}
#fuel-plugins system doesn't have 'primary-controller' role so
#we have to separate controllers' deployment here using waiting cycles.
if ! $primary_controller {
exec {'waiting-for-vpn-agent':
tries => 30,
try_sleep => 10,
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"]
}
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']

View File

@ -3,29 +3,24 @@
class vpnaas::params {
if($::osfamily == 'Redhat') {
$server_package = 'openstack-neutron'
$server_service = 'neutron-server'
$vpnaas_agent_package = 'openstack-neutron-vpn-agent'
$vpnaas_agent_service = 'neutron-vpn-agent'
$openswan_package = 'openswan'
$server_package = 'openstack-neutron'
$dashboard_package = 'openstack-dashboard'
$dashboard_service = 'httpd'
$dashboard_settings = '/etc/openstack-dashboard/local_settings'
$vpnaas_agent_package = 'openstack-neutron-vpn-agent'
$dashboard_package = 'openstack-dashboard'
$dashboard_service = 'httpd'
$dashboard_settings = '/etc/openstack-dashboard/local_settings'
} elsif($::osfamily == 'Debian') {
$server_package = 'neutron-server'
$server_service = 'neutron-server'
$server_package = 'neutron-server'
$vpnaas_agent_package = 'neutron-vpn-agent'
$vpnaas_agent_service = 'neutron-vpn-agent'
$openswan_package = 'openswan'
$vpnaas_agent_package = 'neutron-vpn-agent'
$dashboard_package = 'python-django-horizon'
$dashboard_service = 'apache2'
$dashboard_settings = '/etc/openstack-dashboard/local_settings.py'
$dashboard_package = 'python-django-horizon'
$dashboard_service = 'apache2'
$dashboard_settings = '/etc/openstack-dashboard/local_settings.py'
} else {
@ -33,7 +28,12 @@ class vpnaas::params {
}
$ipsec_service = 'ipsec'
$vpn_agent_ocf_file = '/etc/puppet/modules/cluster/files/ocf/neutron-agent-vpn'
$cleanup_script_file = '/etc/puppet/modules/cluster/files/q-agent-cleanup.py'
$ipsec_service = 'ipsec'
$server_service = 'neutron-server'
$vpnaas_agent_service = 'neutron-vpn-agent'
$openswan_package = 'openswan'
$vpn_agent_ocf_file = '/etc/puppet/modules/cluster/files/ocf/neutron-agent-vpn'
$cleanup_script_file = '/etc/puppet/modules/cluster/files/q-agent-cleanup.py'
}