Set the number for DhcpAgentsPerNetwork to controllers num or 3

Changes the logic which sets DhcpAgentsPerNetwork so that it goes
to the smallest of controllers number or 3.

Ported from original review by gfidente @
https://review.gerrithub.io/#/c/246108/

Change-Id: I187795ff27296e478cc700fc1beb7af58a1473b1
Closes-Bug: 1493445
This commit is contained in:
marios 2015-09-08 19:28:05 +03:00 committed by Brad P. Crochet
parent 6a2082df05
commit 4764f0d56b
2 changed files with 4 additions and 5 deletions

View File

@ -145,7 +145,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
'NeutronAllowL3AgentFailover': False,
'NeutronBridgeMappings': 'datacentre:br-ex',
'NeutronControlPlaneID': 'network id',
'NeutronDhcpAgentsPerNetwork': 3,
'NeutronDhcpAgentsPerNetwork': 1,
'NeutronDnsmasqOptions': 'dhcp-option-force=26,1400',
'NeutronFlatNetworks': 'datacentre',
'NeutronL3HA': False,
@ -288,7 +288,7 @@ class TestDeployOvercloud(fakes.TestDeployOvercloud):
'NeutronAllowL3AgentFailover': False,
'NeutronBridgeMappings': 'datacentre:br-ex',
'NeutronControlPlaneID': 'network id',
'NeutronDhcpAgentsPerNetwork': 3,
'NeutronDhcpAgentsPerNetwork': 1,
'NeutronDnsmasqOptions': 'dhcp-option-force=26,1400',
'NeutronEnableTunnelling': 'True',
'NeutronFlatNetworks': 'datacentre',

View File

@ -344,9 +344,8 @@ class DeployOvercloud(command.Command):
'Compute-1::NeutronAllowL3AgentFailover': False,
})
# set at least 3 dhcp_agents_per_network
dhcp_agents_per_network = (number_controllers if number_controllers and
number_controllers > 3 else 3)
dhcp_agents_per_network = (min(number_controllers, 3) if
number_controllers else 1)
if args.templates:
parameters.update({