Initialize privsep library in Neutron commands
Since the migration to privsep, some Neutron commands execute methods under a privsep context. The privsep library must be initialized first. Change-Id: Icd69bca23d781bace580b3937bc8bd25b586e852 Closes-Bug: #1923870
This commit is contained in:
parent
6c9adc405f
commit
088f1298f2
neutron/cmd
@ -33,6 +33,7 @@ def setup_conf():
|
||||
"""
|
||||
conf = cfg.CONF
|
||||
agent_config.register_root_helper(conf=conf)
|
||||
agent_config.setup_privsep()
|
||||
command.register_cmd_opts(command.ip_opts, conf)
|
||||
return conf
|
||||
|
||||
|
@ -22,6 +22,7 @@ from neutron._i18n import _
|
||||
from neutron.agent import dhcp_agent
|
||||
from neutron.cmd.sanity import checks
|
||||
from neutron.common import config
|
||||
from neutron.conf.agent import common as agent_config
|
||||
from neutron.conf.agent import securitygroups_rpc
|
||||
from neutron.conf.db import l3_hamode_db
|
||||
from neutron.conf.plugins.ml2 import config as ml2_conf
|
||||
@ -419,6 +420,7 @@ def main():
|
||||
cfg.CONF.set_override('use_stderr', True)
|
||||
config.setup_logging()
|
||||
config.init(sys.argv[1:], default_config_files=[])
|
||||
agent_config.setup_privsep()
|
||||
|
||||
if cfg.CONF.config_file:
|
||||
enable_tests_from_config()
|
||||
|
Loading…
x
Reference in New Issue
Block a user