Adds a new config for soft-anti-affinity
Introduces a new config parameter to specify the anti-affinity policy. Bumps nova version. Closes-Bug: 1677604 Change-Id: I8c50057bd43873182058097e802bc839d1be0554
This commit is contained in:
parent
afd6c2b874
commit
e58721c4e0
@ -284,6 +284,12 @@
|
|||||||
# Availability zone to use for creating Amphorae
|
# Availability zone to use for creating Amphorae
|
||||||
# availability_zone =
|
# availability_zone =
|
||||||
|
|
||||||
|
# Enable anti-affinity in nova
|
||||||
|
# enable_anti_affinity = False
|
||||||
|
# Set the anti-affinity policy to what is suitable.
|
||||||
|
# Nova supports: anti-affinity and soft-anti-affinity
|
||||||
|
# anti_affinity_policy = anti-affinity
|
||||||
|
|
||||||
[glance]
|
[glance]
|
||||||
# The name of the glance service in the keystone catalog
|
# The name of the glance service in the keystone catalog
|
||||||
# service_name =
|
# service_name =
|
||||||
|
@ -26,7 +26,7 @@ CONF = cfg.CONF
|
|||||||
|
|
||||||
GLANCE_VERSION = '2'
|
GLANCE_VERSION = '2'
|
||||||
NEUTRON_VERSION = '2.0'
|
NEUTRON_VERSION = '2.0'
|
||||||
NOVA_VERSION = '2.1'
|
NOVA_VERSION = '2.15'
|
||||||
|
|
||||||
|
|
||||||
class NovaAuth(object):
|
class NovaAuth(object):
|
||||||
|
@ -403,6 +403,9 @@ nova_opts = [
|
|||||||
cfg.BoolOpt('enable_anti_affinity', default=False,
|
cfg.BoolOpt('enable_anti_affinity', default=False,
|
||||||
help=_('Flag to indicate if nova anti-affinity feature is '
|
help=_('Flag to indicate if nova anti-affinity feature is '
|
||||||
'turned on.')),
|
'turned on.')),
|
||||||
|
cfg.StrOpt('anti_affinity_policy', default=constants.ANTI_AFFINITY,
|
||||||
|
choices=[constants.ANTI_AFFINITY, constants.SOFT_ANTI_AFFINITY],
|
||||||
|
help=_('Sets the anti-affinity policy for nova')),
|
||||||
cfg.IntOpt('random_amphora_name_length', default=0,
|
cfg.IntOpt('random_amphora_name_length', default=0,
|
||||||
help=_('If non-zero, generate a random name of the length '
|
help=_('If non-zero, generate a random name of the length '
|
||||||
'provided for each amphora, in the format "a[A-Z0-9]*". '
|
'provided for each amphora, in the format "a[A-Z0-9]*". '
|
||||||
|
@ -158,6 +158,7 @@ LOADBALANCER = 'loadbalancer'
|
|||||||
LOADBALANCER_ID = 'loadbalancer_id'
|
LOADBALANCER_ID = 'loadbalancer_id'
|
||||||
SERVER_GROUP_ID = 'server_group_id'
|
SERVER_GROUP_ID = 'server_group_id'
|
||||||
ANTI_AFFINITY = 'anti-affinity'
|
ANTI_AFFINITY = 'anti-affinity'
|
||||||
|
SOFT_ANTI_AFFINITY = 'soft-anti-affinity'
|
||||||
MEMBER = 'member'
|
MEMBER = 'member'
|
||||||
MEMBER_ID = 'member_id'
|
MEMBER_ID = 'member_id'
|
||||||
COMPUTE_ID = 'compute_id'
|
COMPUTE_ID = 'compute_id'
|
||||||
|
@ -208,7 +208,7 @@ class NovaServerGroupCreate(BaseComputeTask):
|
|||||||
|
|
||||||
name = 'octavia-lb-' + loadbalancer_id
|
name = 'octavia-lb-' + loadbalancer_id
|
||||||
server_group = self.compute.create_server_group(
|
server_group = self.compute.create_server_group(
|
||||||
name, constants.ANTI_AFFINITY)
|
name, CONF.nova.anti_affinity_policy)
|
||||||
LOG.debug("Server Group created with id: %s for load balancer id: "
|
LOG.debug("Server Group created with id: %s for load balancer id: "
|
||||||
"%s", server_group.id, loadbalancer_id)
|
"%s", server_group.id, loadbalancer_id)
|
||||||
return server_group.id
|
return server_group.id
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Adds a new config parameter to specify the anti-affinity policy
|
Loading…
x
Reference in New Issue
Block a user