The lb namespace can not be deleted
When delete the last listener, the lb instance was undeployed.
But the lb namespace was not deleted at this time. After that,
when delete the loadbalancer, the lb namespace will not be
deleted for the exists() check always return False.
Closes-Bug: #1495430
(cherry picked from commit 9073940a82
)
Change-Id: Ic3cb25a6bd2bf86f8c30ef62ae323c3bab0c82fc
This commit is contained in:
parent
0a32ba610e
commit
16a323dbf7
|
@ -444,7 +444,8 @@ class ListenerManager(agent_device_driver.BaseListenerManager):
|
|||
else:
|
||||
# undeploy instance because haproxy will throw error if port is
|
||||
# missing in frontend
|
||||
self.driver.undeploy_instance(loadbalancer.id)
|
||||
self.driver.undeploy_instance(loadbalancer.id,
|
||||
delete_namespace=True)
|
||||
|
||||
|
||||
class PoolManager(agent_device_driver.BasePoolManager):
|
||||
|
|
|
@ -570,7 +570,8 @@ class TestListenerManager(BaseTestListenerManager):
|
|||
self.driver.reset_mock()
|
||||
self.listener_manager.delete(self.listener2)
|
||||
self.assertFalse(self.refresh.called)
|
||||
self.driver.undeploy_instance.assert_called_once_with(self.in_lb.id)
|
||||
self.driver.undeploy_instance.assert_called_once_with(
|
||||
self.in_lb.id, delete_namespace=True)
|
||||
|
||||
|
||||
class BaseTestPoolManager(BaseTestListenerManager):
|
||||
|
|
Loading…
Reference in New Issue