Pārlūkot izejas kodu

Add parameters for amphora anti-affinity

This patch adds the Octavia configuration parameters for amphora
anti-affinity when using active/standby topology load balancers.

Change-Id: I9e636b2d420497f7bf65912fddf7cba72d350a9e
(cherry picked from commit 4bd67a42d0)
(cherry picked from commit 0eaf41481b)
(cherry picked from commit c10b3cf2c5)
(cherry picked from commit 27c80b1582)
changes/66/696966/1
Michael Johnson Carlos Goncalves pirms 6 mēnešiem
vecāks
revīzija
280af2381d
3 mainītis faili ar 25 papildinājumiem un 1 dzēšanām
  1. +13
    -0
      manifests/controller.pp
  2. +5
    -0
      releasenotes/notes/add-anti-affinity-0f80e4ac5fd4bde6.yaml
  3. +7
    -1
      spec/classes/octavia_controller_spec.rb

+ 13
- 0
manifests/controller.pp Parādīt failu

@@ -99,6 +99,15 @@
# [*vrrp_garp_refresh_count*]
# (optional) Number of gratuitous ARP announcements to make on each refresh interval.
# Defaults to $::os_service_default
#
# [*enable_anti_affinity*]
# (optional) Flag to indicate if octavia anti-affinity feature is turned on.
# Defaults to $::os_service_default
#
# [*anti_affinity_policy*]
# (optional) Sets the nova anti-affinity policy for octavia.
# Defaults to $::os_service_default

class octavia::controller (
$amp_flavor_id = '65',
$amp_image_tag = $::os_service_default,
@@ -122,6 +131,8 @@ class octavia::controller (
$vrrp_success_count = $::os_service_default,
$vrrp_garp_refresh_interval = $::os_service_default,
$vrrp_garp_refresh_count = $::os_service_default,
$enable_anti_affinity = $::os_service_default,
$anti_affinity_policy = $::os_service_default,
) inherits octavia::params {

include ::octavia::deps
@@ -172,5 +183,7 @@ class octavia::controller (
'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;
'nova/enable_anti_affinity' : value => $enable_anti_affinity;
'nova/anti_affinity_policy' : value => $anti_affinity_policy;
}
}

+ 5
- 0
releasenotes/notes/add-anti-affinity-0f80e4ac5fd4bde6.yaml Parādīt failu

@@ -0,0 +1,5 @@
---
features:
- |
Add parameters to enable and configure nova anti-affinity for
active/standby amphorae.

+ 7
- 1
spec/classes/octavia_controller_spec.rb Parādīt failu

@@ -30,7 +30,9 @@ describe 'octavia::controller' do
:vrrp_fail_count => 2,
:vrrp_success_count => 2,
:vrrp_garp_refresh_interval => 5,
:vrrp_garp_refresh_count => 2
:vrrp_garp_refresh_count => 2,
:enable_anti_affinity => true,
:anti_affinity_policy => 'anti-affinity',
}
end

@@ -52,6 +54,8 @@ describe 'octavia::controller' do
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) }
it { is_expected.to contain_octavia_config('nova/enable_anti_affinity').with_value(true) }
it { is_expected.to contain_octavia_config('nova/anti_affinity_policy').with_value('anti-affinity') }
end

it 'configures worker parameters' do
@@ -71,6 +75,8 @@ describe 'octavia::controller' do
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>')
is_expected.to contain_octavia_config('nova/enable_anti_affinity').with_value('<SERVICE DEFAULT>')
is_expected.to contain_octavia_config('nova/anti_affinity_policy').with_value('<SERVICE DEFAULT>')
end

context 'with ssh key access disabled' do


Notiek ielāde…
Atcelt
Saglabāt