Browse Source

Add keepalivd vrrp parameters

Change-Id: I26ad5d41239b6e770e975dc6f78fc46a87803220
(cherry picked from commit 8fd7b2e0ff)
(cherry picked from commit b659647dbd)
(cherry picked from commit 3de4adbe19)
(cherry picked from commit f49cfd3bd0)
changes/82/688282/3
Carlos Goncalves 7 months ago
parent
commit
251c78b7ae
3 changed files with 87 additions and 31 deletions
  1. +65
    -30
      manifests/controller.pp
  2. +3
    -0
      releasenotes/notes/add-vrrp-keepalived-params-81f235f8cc411c42.yaml
  3. +19
    -1
      spec/classes/octavia_controller_spec.rb

+ 65
- 30
manifests/controller.pp View File

@@ -76,23 +76,52 @@
# (optional) Seconds to wait for a port to detach from an amphora.
# Defaults to $::os_service_default
#
# [*vrrp_advert_int*]
# (optional) Amphora role and priority advertisement internal in seconds.
# Defaults to $::os_service_default
#
# [*vrrp_check_interval*]
# (optional) VRRP health check script run interval in seconds.
# Defaults to $::os_service_default
#
# [*vrrp_fail_count*]
# (optional) Number of successive failures before transition to a fail rate.
# Defaults to $::os_service_default
#
# [*vrrp_success_count*]
# (optional) Number of consecutive successes before transition to a success rate.
# Defaults to $::os_service_default
#
# [*vrrp_garp_refresh_interval*]
# (optional) Time in seconds between gratuitous ARP announcements from the MASTER.
# Defaults to $::os_service_default
#
# [*vrrp_garp_refresh_count*]
# (optional) Number of gratuitous ARP announcements to make on each refresh interval.
# Defaults to $::os_service_default
class octavia::controller (
$amp_flavor_id = '65',
$amp_image_tag = $::os_service_default,
$amp_secgroup_list = $::os_service_default,
$amp_boot_network_list = [],
$loadbalancer_topology = $::os_service_default,
$amphora_driver = 'amphora_haproxy_rest_driver',
$compute_driver = 'compute_nova_driver',
$network_driver = 'allowed_address_pairs_driver',
$enable_ssh_access = true,
$amp_ssh_key_name = 'octavia-ssh-key',
$controller_ip_port_list = $::os_service_default,
$connection_max_retries = $::os_service_default,
$connection_retry_interval = $::os_service_default,
$connection_logging = $::os_service_default,
$build_active_retries = $::os_service_default,
$port_detach_timeout = $::os_service_default,
$amp_flavor_id = '65',
$amp_image_tag = $::os_service_default,
$amp_secgroup_list = $::os_service_default,
$amp_boot_network_list = [],
$loadbalancer_topology = $::os_service_default,
$amphora_driver = 'amphora_haproxy_rest_driver',
$compute_driver = 'compute_nova_driver',
$network_driver = 'allowed_address_pairs_driver',
$enable_ssh_access = true,
$amp_ssh_key_name = 'octavia-ssh-key',
$controller_ip_port_list = $::os_service_default,
$connection_max_retries = $::os_service_default,
$connection_retry_interval = $::os_service_default,
$connection_logging = $::os_service_default,
$build_active_retries = $::os_service_default,
$port_detach_timeout = $::os_service_default,
$vrrp_advert_int = $::os_service_default,
$vrrp_check_interval = $::os_service_default,
$vrrp_fail_count = $::os_service_default,
$vrrp_success_count = $::os_service_default,
$vrrp_garp_refresh_interval = $::os_service_default,
$vrrp_garp_refresh_count = $::os_service_default,
) inherits octavia::params {

include ::octavia::deps
@@ -123,19 +152,25 @@ class octavia::controller (
}

octavia_config {
'controller_worker/amp_flavor_id' : value => $amp_flavor_id_real;
'controller_worker/amp_image_tag' : value => $amp_image_tag_real;
'controller_worker/amp_secgroup_list' : value => $amp_secgroup_list_real;
'controller_worker/amp_boot_network_list' : value => $amp_boot_network_list_real;
'controller_worker/loadbalancer_topology' : value => $loadbalancer_topology_real;
'controller_worker/amphora_driver' : value => $amphora_driver_real;
'controller_worker/compute_driver' : value => $compute_driver_real;
'controller_worker/network_driver' : value => $network_driver_real;
'health_manager/controller_ip_port_list' : value => $controller_ip_port_list;
'haproxy_amphora/connection_max_retries' : value => $connection_max_retries;
'haproxy_amphora/connection_retry_interval' : value => $connection_retry_interval;
'haproxy_amphora/connection_logging' : value => $connection_logging;
'haproxy_amphora/build_active_retries' : value => $build_active_retries;
'networking/port_detach_timeout' : value => $port_detach_timeout;
'controller_worker/amp_flavor_id' : value => $amp_flavor_id_real;
'controller_worker/amp_image_tag' : value => $amp_image_tag_real;
'controller_worker/amp_secgroup_list' : value => $amp_secgroup_list_real;
'controller_worker/amp_boot_network_list' : value => $amp_boot_network_list_real;
'controller_worker/loadbalancer_topology' : value => $loadbalancer_topology_real;
'controller_worker/amphora_driver' : value => $amphora_driver_real;
'controller_worker/compute_driver' : value => $compute_driver_real;
'controller_worker/network_driver' : value => $network_driver_real;
'health_manager/controller_ip_port_list' : value => $controller_ip_port_list;
'haproxy_amphora/connection_max_retries' : value => $connection_max_retries;
'haproxy_amphora/connection_retry_interval' : value => $connection_retry_interval;
'haproxy_amphora/connection_logging' : value => $connection_logging;
'haproxy_amphora/build_active_retries' : value => $build_active_retries;
'networking/port_detach_timeout' : value => $port_detach_timeout;
'keepalived_vrrp/vrrp_advert_int' : value => $vrrp_advert_int;
'keepalived_vrrp/vrrp_check_interval' : value => $vrrp_check_interval;
'keepalived_vrrp/vrrp_fail_count' : value => $vrrp_fail_count;
'keepalived_vrrp/vrrp_success_count' : value => $vrrp_success_count;
'keepalived_vrrp/vrrp_garp_refresh_interval' : value => $vrrp_garp_refresh_interval;
'keepalived_vrrp/vrrp_garp_refresh_count' : value => $vrrp_garp_refresh_count;
}
}

+ 3
- 0
releasenotes/notes/add-vrrp-keepalived-params-81f235f8cc411c42.yaml View File

@@ -0,0 +1,3 @@
---
features:
- Added Keepalived VRRP parameters.

+ 19
- 1
spec/classes/octavia_controller_spec.rb View File

@@ -24,7 +24,13 @@ describe 'octavia::controller' do
:connection_retry_interval => 10,
:connection_logging => false,
:build_active_retries => 5,
:port_detach_timeout => 15
:port_detach_timeout => 15,
:vrrp_advert_int => 1,
:vrrp_check_interval => 5,
:vrrp_fail_count => 2,
:vrrp_success_count => 2,
:vrrp_garp_refresh_interval => 5,
:vrrp_garp_refresh_count => 2
}
end

@@ -40,6 +46,12 @@ describe 'octavia::controller' do
it { is_expected.to contain_octavia_config('haproxy_amphora/connection_logging').with_value(false) }
it { is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value(5) }
it { is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value(15) }
it { is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_advert_int').with_value(1) }
it { is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_check_interval').with_value(5) }
it { is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_fail_count').with_value(2) }
it { is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_success_count').with_value(2) }
it { is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_garp_refresh_interval').with_value(5) }
it { is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_garp_refresh_count').with_value(2) }
end

it 'configures worker parameters' do
@@ -53,6 +65,12 @@ describe 'octavia::controller' do
is_expected.to contain_octavia_config('haproxy_amphora/connection_logging').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('haproxy_amphora/build_active_retries').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('networking/port_detach_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_advert_int').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_check_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_fail_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_success_count').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_garp_refresh_interval').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('keepalived_vrrp/vrrp_garp_refresh_count').with_value('<SERVICE DEFAULT>')
end

context 'with ssh key access disabled' do


Loading…
Cancel
Save