lb: don't stop haproxy when becoming backup

This would allow faster switch time if haproxy is already started.
Note: still trying to start haproxy when becoming master to be sure it's
started.

Change-Id: I7477cad8c8c185968b9b0bcc2e2f3ba328ba5aeb
This commit is contained in:
François Charlier 2015-02-04 11:41:05 +01:00
parent a54f3e61ea
commit 5a3e38a728
3 changed files with 0 additions and 8 deletions

View File

@ -535,7 +535,6 @@ class cloud::loadbalancer(
auth_type => $keepalived_auth_type,
auth_pass => $keepalived_auth_pass,
notify_master => $::cloud::params::start_haproxy_service,
notify_backup => $::cloud::params::stop_haproxy_service,
}
@ -558,7 +557,6 @@ class cloud::loadbalancer(
auth_type => $keepalived_auth_type,
auth_pass => $keepalived_auth_pass,
notify_master => $::cloud::params::start_haproxy_service,
notify_backup => $::cloud::params::stop_haproxy_service,
}
}
}

View File

@ -42,7 +42,6 @@ class cloud::params {
'RedHat': {
# Specific to Red Hat
$start_haproxy_service = '"/usr/bin/systemctl start haproxy"'
$stop_haproxy_service = '"/usr/bin/systemctl stop haproxy"'
$horizon_auth_url = 'dashboard'
$libvirt_service_name = 'libvirtd'
$keepalived_name_is_process = false
@ -53,7 +52,6 @@ class cloud::params {
'Debian': {
# Specific to Debian / Ubuntu
$start_haproxy_service = '"/etc/init.d/haproxy start"'
$stop_haproxy_service = '"/etc/init.d/haproxy stop"'
$horizon_auth_url = 'horizon'
$keepalived_name_is_process = true
$keepalived_vrrp_script = undef

View File

@ -131,7 +131,6 @@ describe 'cloud::loadbalancer' do
'auth_type' => 'PASS',
'auth_pass' => 'secret',
'notify_master' => "#{platform_params[:start_haproxy_service]}",
'notify_backup' => "#{platform_params[:stop_haproxy_service]}",
})
end
end
@ -167,7 +166,6 @@ describe 'cloud::loadbalancer' do
'auth_type' => 'PASS',
'auth_pass' => 'secret',
'notify_master' => "#{platform_params[:start_haproxy_service]}",
'notify_backup' => "#{platform_params[:stop_haproxy_service]}",
})
end # configure vrrp_instance with BACKUP state
it 'configure haproxy server without service managed' do
@ -188,7 +186,6 @@ describe 'cloud::loadbalancer' do
'auth_type' => 'PASS',
'auth_pass' => 'secret',
'notify_master' => "#{platform_params[:start_haproxy_service]}",
'notify_backup' => "#{platform_params[:stop_haproxy_service]}",
})
end
it 'configure haproxy server with service managed' do
@ -620,7 +617,6 @@ describe 'cloud::loadbalancer' do
let :platform_params do
{ :auth_url => 'dashboard',
:start_haproxy_service => '"/usr/bin/systemctl start haproxy"',
:stop_haproxy_service => '"/usr/bin/systemctl stop haproxy"',
:keepalived_name_is_process => 'false',
:keepalived_vrrp_script => 'systemctl status haproxy.service',
}