diff --git a/hooks/neutron_ovs_hooks.py b/hooks/neutron_ovs_hooks.py index 0d28d8e9..4fa7690a 100755 --- a/hooks/neutron_ovs_hooks.py +++ b/hooks/neutron_ovs_hooks.py @@ -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) diff --git a/unit_tests/test_neutron_ovs_hooks.py b/unit_tests/test_neutron_ovs_hooks.py index c88b927f..a8c9766d 100644 --- a/unit_tests/test_neutron_ovs_hooks.py +++ b/unit_tests/test_neutron_ovs_hooks.py @@ -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')