diff --git a/neutron/cmd/netns_cleanup.py b/neutron/cmd/netns_cleanup.py index c2b74355f9d..8c54bbc44fd 100644 --- a/neutron/cmd/netns_cleanup.py +++ b/neutron/cmd/netns_cleanup.py @@ -36,10 +36,12 @@ from neutron.i18n import _LE LOG = logging.getLogger(__name__) -NS_MANGLING_PATTERN = ('(%s|%s|%s|%s)' % (dhcp.NS_PREFIX, +LB_NS_PREFIX = 'qlbaas-' +NS_MANGLING_PATTERN = ('(%s|%s|%s|%s|%s)' % (dhcp.NS_PREFIX, l3_agent.NS_PREFIX, dvr.SNAT_NS_PREFIX, - dvr_fip_ns.FIP_NS_PREFIX) + + dvr_fip_ns.FIP_NS_PREFIX, + LB_NS_PREFIX) + attributes.UUID_PATTERN) diff --git a/neutron/tests/unit/cmd/test_netns_cleanup.py b/neutron/tests/unit/cmd/test_netns_cleanup.py index 2da02c77f74..23eb2152c88 100644 --- a/neutron/tests/unit/cmd/test_netns_cleanup.py +++ b/neutron/tests/unit/cmd/test_netns_cleanup.py @@ -78,6 +78,9 @@ class TestNetnsCleanup(base.BaseTestCase): def test_eligible_for_deletion_fip_namespace(self): self._test_eligible_for_deletion_helper('fip-', False, True, True) + def test_eligible_for_deletion_lbaas_namespace(self): + self._test_eligible_for_deletion_helper('qlbaas-', False, True, True) + def test_eligible_for_deletion_snat_namespace(self): self._test_eligible_for_deletion_helper('snat-', False, True, True)