Ensure mtu is set correctly on ctlplane

We were not passing the MTU when we create the ctlplane network so if
the local_mtu is less than 1500, 1500 is used by the ctlplane network in
neutron.

Change-Id: Ic7a4c5a62ff49b2f8964dd58bf5c97d9781c4ce1
Related-Bug: #1754036
This commit is contained in:
Alex Schultz 2018-03-13 15:46:11 -06:00 committed by yatin
parent 11830a2020
commit 1bc7a07dec
2 changed files with 3 additions and 2 deletions

View File

@ -1412,7 +1412,7 @@ class TestPostConfig(BaseTestCase):
undercloud._ensure_neutron_network(mock_sdk)
mock_sdk.network.create_network.assert_called_with(
name='ctlplane', provider_network_type='flat',
provider_physical_network='ctlplane')
provider_physical_network='ctlplane', mtu=1500)
def test_delete_default_segment(self):
mock_sdk = self._neutron_mocks()

View File

@ -2020,9 +2020,10 @@ def _ensure_neutron_network(sdk):
try:
network = list(sdk.network.networks(name=PHYSICAL_NETWORK))
if not network:
mtu = CONF.get("local_mtu")
network = sdk.network.create_network(
name=PHYSICAL_NETWORK, provider_network_type='flat',
provider_physical_network=PHYSICAL_NETWORK)
provider_physical_network=PHYSICAL_NETWORK, mtu=mtu)
LOG.info("Network created %s", network)
# (hjensas) Delete the default segment, we create a new segment
# per subnet later.