Add anti-affinity-policy config option
This new option allows an operator decide if anti-affinity is set to hint Nova of where to schedule the load balancers when the topology is ACTIVE_STANDBY. By default anti-affinity-policy is set to 'auto' which will set the policy to soft-anti-affinity when the topology is set to ACTIVE_STANDBY otherwise enable_anti_affinity is set to False. Change-Id: I593a2784f12eb8abee2ec48aede27bdc745e5ede Closes-Bug: #1813263
This commit is contained in:
parent
24e2f1050c
commit
54efc3a2b4
|
@ -156,3 +156,13 @@ options:
|
|||
type: string
|
||||
description: |
|
||||
Comma separated list of nagios servicegroups for the graphite check
|
||||
anti-affinity-policy:
|
||||
default: auto
|
||||
type: string
|
||||
description: |
|
||||
Sets the anti-affinity policy for Nova. Possible values are
|
||||
anti-affinity, soft-anti-affinity, auto or disable.
|
||||
|
||||
When set to auto, the charm will choose between disabling anti-affinity
|
||||
entirely or using soft-anti-affinity depending if loadbalancer-topology
|
||||
is set to SINGLE or ACTIVE_STANDBY respectively.
|
||||
|
|
|
@ -46,6 +46,17 @@ network_driver = allowed_address_pairs_driver
|
|||
compute_driver = compute_nova_driver
|
||||
amphora_driver = amphora_haproxy_rest_driver
|
||||
loadbalancer_topology = {{ options.loadbalancer_topology }}
|
||||
{%- if options.loadbalancer_topology == "SINGLE" or options.anti_affinity_policy == "disable" %}
|
||||
enable_anti_affinity = False
|
||||
{%- elif options.loadbalancer_topology == "ACTIVE_STANDBY" %}
|
||||
{%- if options.anti_affinity_policy == "auto" %}
|
||||
enable_anti_affinity = True
|
||||
anti_affinity_policy = "soft-anti-affinity"
|
||||
{%- elif options.anti_affinity_policy in ["anti-affinity", "soft-anti-affinity"] %}
|
||||
enable_anti_affinity = True
|
||||
anti_affinity_policy = {{ options.anti_affinity_policy }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
[certificates]
|
||||
# NOTE(fnordahl) certificates for authentication between Octavia controllers
|
||||
|
|
|
@ -57,6 +57,17 @@ network_driver = allowed_address_pairs_driver
|
|||
compute_driver = compute_nova_driver
|
||||
amphora_driver = amphora_haproxy_rest_driver
|
||||
loadbalancer_topology = {{ options.loadbalancer_topology }}
|
||||
{%- if options.loadbalancer_topology == "SINGLE" or options.anti_affinity_policy == "disable" %}
|
||||
enable_anti_affinity = False
|
||||
{%- elif options.loadbalancer_topology == "ACTIVE_STANDBY" %}
|
||||
{%- if options.anti_affinity_policy == "auto" %}
|
||||
enable_anti_affinity = True
|
||||
anti_affinity_policy = "soft-anti-affinity"
|
||||
{%- elif options.anti_affinity_policy in ["anti-affinity", "soft-anti-affinity"] %}
|
||||
enable_anti_affinity = True
|
||||
anti_affinity_policy = {{ options.anti_affinity_policy }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
[certificates]
|
||||
# NOTE(fnordahl) certificates for authentication between Octavia controllers
|
||||
|
|
|
@ -61,6 +61,17 @@ network_driver = allowed_address_pairs_driver
|
|||
compute_driver = compute_nova_driver
|
||||
amphora_driver = amphora_haproxy_rest_driver
|
||||
loadbalancer_topology = {{ options.loadbalancer_topology }}
|
||||
{%- if options.loadbalancer_topology == "SINGLE" or options.anti_affinity_policy == "disable" %}
|
||||
enable_anti_affinity = False
|
||||
{%- elif options.loadbalancer_topology == "ACTIVE_STANDBY" %}
|
||||
{%- if options.anti_affinity_policy == "auto" %}
|
||||
enable_anti_affinity = True
|
||||
anti_affinity_policy = "soft-anti-affinity"
|
||||
{%- elif options.anti_affinity_policy in ["anti-affinity", "soft-anti-affinity"] %}
|
||||
enable_anti_affinity = True
|
||||
anti_affinity_policy = {{ options.anti_affinity_policy }}
|
||||
{%- endif %}
|
||||
{%- endif %}
|
||||
|
||||
[certificates]
|
||||
# NOTE(fnordahl) certificates for authentication between Octavia controllers
|
||||
|
|
Loading…
Reference in New Issue