Browse Source

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
(cherry picked from commit 088f1298f2)
changes/95/787495/1
Rodolfo Alonso Hernandez 2 months ago
committed by Rodolfo Alonso
parent
commit
de78aaec9d
2 changed files with 3 additions and 0 deletions
  1. +1
    -0
      neutron/cmd/ipset_cleanup.py
  2. +2
    -0
      neutron/cmd/sanity_check.py

+ 1
- 0
neutron/cmd/ipset_cleanup.py View File

@ -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


+ 2
- 0
neutron/cmd/sanity_check.py View File

@ -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…
Cancel
Save