Browse Source

Set option:mtu in inspector dnsmasq

Set the mtu for all subnets in inspector dnsmasq
config to value of 'local_mtu' in undercloud.conf.

Change-Id: I2c6759f750de335b81c6335da7be8e09375c981a
Closes-Bug: #1845487
Depends-On: Ic95dbf1867fb5397f1b6d8f23466910a97051cb6
(cherry picked from commit 0528a93587)
changes/44/687344/2
Harald Jensås 8 months ago
parent
commit
70c4c33cf7
2 changed files with 4 additions and 3 deletions
  1. +3
    -3
      instack_undercloud/tests/test_undercloud.py
  2. +1
    -0
      instack_undercloud/undercloud.py

+ 3
- 3
instack_undercloud/tests/test_undercloud.py View File

@@ -675,7 +675,7 @@ class TestGenerateEnvironment(BaseTestCase):
env = undercloud._generate_environment('.')
reference = [{"tag": "ctlplane-subnet", "gateway": "192.168.24.1",
"ip_range": "192.168.24.100,192.168.24.120",
"netmask": "255.255.255.0"}]
"netmask": "255.255.255.0", "mtu": 1500}]
actual = json.loads(env['INSPECTION_SUBNETS'])
self.assertEqual(reference, actual)

@@ -697,10 +697,10 @@ class TestGenerateEnvironment(BaseTestCase):
env = undercloud._generate_environment('.')
reference = [{"tag": "subnet1", "gateway": "192.168.10.254",
"ip_range": "192.168.10.100,192.168.10.189",
"netmask": "255.255.255.0"},
"netmask": "255.255.255.0", "mtu": 1500},
{"tag": "subnet2", "gateway": "192.168.20.254",
"ip_range": "192.168.20.100,192.168.20.189",
"netmask": "255.255.255.0"}]
"netmask": "255.255.255.0", "mtu": 1500}]
actual = json.loads(env['INSPECTION_SUBNETS'])
self.assertEqual(reference, actual)



+ 1
- 0
instack_undercloud/undercloud.py View File

@@ -1309,6 +1309,7 @@ def _generate_inspection_subnets():
env_dict['ip_range'] = s.inspection_iprange
env_dict['netmask'] = str(netaddr.IPNetwork(s.cidr).netmask)
env_dict['gateway'] = s.gateway
env_dict['mtu'] = CONF.local_mtu
env_list.append(env_dict)
return json.dumps(env_list)



Loading…
Cancel
Save