Remove keepalived purge when dvr enabled

Stop the charm from uninstalling keepalived when
using dvr since it also removes neutron-l3-agent.

Change-Id: I62d4cd2ee635ce793e37d4760387047b1b38f973
Closes-Bug: #1819499
This commit is contained in:
Edward Hope-Morley 2019-03-11 18:06:14 +00:00
parent 381a3b1a33
commit 7b6f93fc11
2 changed files with 4 additions and 3 deletions

View File

@ -146,8 +146,9 @@ def neutron_plugin_api_changed():
if (use_l3ha() and
CompareOpenStackReleases(_os_release) >= 'newton'):
install_l3ha_packages()
else:
packages_to_purge.extend(L3HA_PACKAGES)
# NOTE(hopem): don't uninstall keepalived if not using l3ha since that
# results in neutron-l3-agent also being uninstalled (see LP 1819499).
else:
packages_to_purge = deepcopy(DVR_PACKAGES)
packages_to_purge.extend(L3HA_PACKAGES)

View File

@ -219,7 +219,7 @@ class NeutronOVSHooksTests(CharmTestCase):
self.configure_ovs.assert_called_with()
self.assertTrue(self.CONFIGS.write_all.called)
_plugin_joined.assert_called_with(relation_id='rid')
self.purge_packages.assert_called_with(['keepalived'])
self.purge_packages.assert_not_called()
@patch.object(hooks, 'os_release')
@patch.object(hooks, 'neutron_plugin_joined')