Specifiy the network size when creating fixed network

The default was 255
https://bugzilla.redhat.com/show_bug.cgi?id=923650

Change-Id: If2c30916cd01406874b44c12d642749c401f1232
This commit is contained in:
Derek Higgins
2013-03-20 08:41:20 -04:00
parent 1b62ee7d15
commit f552d12b37
2 changed files with 6 additions and 0 deletions

View File

@@ -350,6 +350,11 @@ def createnetworkmanifest():
else:
controller.CONF['CONFIG_NOVA_NETWORK_AUTOASSIGNFLOATINGIP'] = False
# We need to explicitly set the network size
routing_prefix = controller.CONF['CONFIG_NOVA_NETWORK_FIXEDRANGE'].split('/')[1]
net_size = 2**(32 - int(routing_prefix))
controller.CONF['CONFIG_NOVA_NETWORK_FIXEDSIZE'] = str(net_size)
manifestfile = "%s_nova.pp" % host
manifestdata = getManifestTemplate("nova_network.pp")
appendManifestFile(manifestfile, manifestdata)

View File

@@ -7,6 +7,7 @@ class {"nova::network":
private_interface => '%(CONFIG_NOVA_NETWORK_PRIVIF)s',
public_interface => '%(CONFIG_NOVA_NETWORK_PUBIF)s',
fixed_range => '%(CONFIG_NOVA_NETWORK_FIXEDRANGE)s',
network_size => '%(CONFIG_NOVA_NETWORK_FIXEDSIZE)s',
floating_range => '%(CONFIG_NOVA_NETWORK_FLOATRANGE)s',
config_overrides => {force_dhcp_release => false}
}