Add setup_privsep in agent's main function
As Neutron switched to use pyroute2 for managing namespaces in 4f627b4e8dfe699944a196fe90e0642cced6278f neutron-lbaas needs to setup privsep in agent to make possible manipulating with network namespaces. Change-Id: I084f8d54cc619a1c99658396d5cab036a2663413 Closes-Bug: #1723856
This commit is contained in:
parent
a5294c1d11
commit
8ee7dd2da7
|
@ -57,6 +57,7 @@ def main():
|
|||
|
||||
common_config.init(sys.argv[1:])
|
||||
config.setup_logging()
|
||||
config.setup_privsep()
|
||||
|
||||
mgr = manager.LbaasAgentManager(cfg.CONF)
|
||||
svc = LbaasAgentService(
|
||||
|
|
|
@ -35,7 +35,9 @@ class TestLbaasService(base.BaseTestCase):
|
|||
|
||||
def test_main(self):
|
||||
logging_str = 'neutron.conf.agent.common.setup_logging'
|
||||
privsep_str = 'neutron.conf.agent.common.setup_privsep'
|
||||
with mock.patch(logging_str), \
|
||||
mock.patch(privsep_str), \
|
||||
mock.patch.object(agent.service, 'launch') as mock_launch, \
|
||||
mock.patch('sys.argv'), \
|
||||
mock.patch.object(agent.manager, 'LbaasAgentManager'), \
|
||||
|
|
Loading…
Reference in New Issue