Fix regression of disable-mlockall

This restores OVS_DEFAULT to the BASE_RESOURCE_MAP.

There were some changes in commit ad7f870c that moved OVS_DEFAULT
out of the BASE_RESOURCE_MAP, which resulted in no more rendering
of /etc/default/openvswitch-switch for non-DPDK deployments.

Closes-Bug: #1925962
Change-Id: I8bc6e0c20e5702db5a44fda531b6a59ada5bee1e
This commit is contained in:
Corey Bryant 2021-04-23 16:40:16 -04:00 committed by Alex Kavanagh
parent be273f7719
commit 96ba49807c
2 changed files with 7 additions and 3 deletions

View File

@ -185,6 +185,10 @@ BASE_RESOURCE_MAP = OrderedDict([
'services': ['neutron-openvswitch-agent'],
'contexts': [neutron_ovs_context.OVSPluginContext()],
}),
(OVS_DEFAULT, {
'services': ['openvswitch-switch'],
'contexts': [neutron_ovs_context.OVSPluginContext()],
}),
(PHY_NIC_MTU_CONF, {
'services': ['os-charm-phy-nic-mtu'],
'contexts': [context.PhyNICMTUContext()],

View File

@ -428,7 +428,7 @@ class TestNeutronOVSUtils(CharmTestCase):
_regconfs = nutils.register_configs()
confs = ['/etc/neutron/neutron.conf',
'/etc/neutron/plugins/ml2/ml2_conf.ini',
# '/etc/default/openvswitch-switch',
'/etc/default/openvswitch-switch',
'/etc/init/os-charm-phy-nic-mtu.conf']
self.assertEqual(_regconfs.configs, confs)
@ -450,7 +450,7 @@ class TestNeutronOVSUtils(CharmTestCase):
_regconfs = nutils.register_configs()
confs = ['/etc/neutron/neutron.conf',
'/etc/neutron/plugins/ml2/openvswitch_agent.ini',
# '/etc/default/openvswitch-switch',
'/etc/default/openvswitch-switch',
'/etc/init/os-charm-phy-nic-mtu.conf']
self.assertEqual(_regconfs.configs, confs)
@ -584,7 +584,7 @@ class TestNeutronOVSUtils(CharmTestCase):
for item in _restart_map:
self.assertTrue(item in _restart_map)
self.assertTrue(expect[item] == _restart_map[item])
self.assertEqual(len(_restart_map.keys()), 2)
self.assertEqual(len(_restart_map.keys()), 3)
@patch('charmhelpers.contrib.openstack.context.list_nics',
return_value=['eth0'])