Remove rootwrap configuration from neutron-keepalived-state-change

New IP command introduced by Ie3fe825d65408fc969c478767b411fe0156e9fbc
requires only privsep initialization. This patch removes the prisep
error FailedToDropPrivileges when executed under neutron-rootwrap.

Closes-Bug: #1823038

Change-Id: I6cde3c9dae7ffdccce49e88c3c79d1c379f291cf
(cherry picked from commit aacd11ab9f)
This commit is contained in:
Rodolfo Alonso Hernandez 2019-05-10 10:58:08 +00:00 committed by Slawek Kaplonski
parent 519b3b58e6
commit 9a498d993f
3 changed files with 1 additions and 11 deletions

View File

@ -362,7 +362,6 @@ class HaRouter(router.RouterInfo):
ha_cidr = self._get_primary_vip()
def callback(pid_file):
root_helper_daemon = self.agent_conf.AGENT.root_helper_daemon or ''
cmd = [
'neutron-keepalived-state-change',
'--router_id=%s' % self.router_id,
@ -373,9 +372,7 @@ class HaRouter(router.RouterInfo):
'--pid_file=%s' % pid_file,
'--state_path=%s' % self.agent_conf.state_path,
'--user=%s' % os.geteuid(),
'--group=%s' % os.getegid(),
'--AGENT-root_helper=%s' % self.agent_conf.AGENT.root_helper,
'--AGENT-root_helper_daemon=%s' % root_helper_daemon]
'--group=%s' % os.getegid()]
return cmd
return callback

View File

@ -163,8 +163,6 @@ def configure(conf):
def main():
agent_config.register_root_helper(cfg.CONF)
cfg.CONF.register_cli_opts(agent_config.ROOT_HELPER_OPTS, 'AGENT')
keepalived.register_cli_l3_agent_keepalived_opts()
keepalived.register_l3_agent_keepalived_opts()
configure(cfg.CONF)

View File

@ -98,11 +98,6 @@ class L3AgentTestFramework(base.BaseSudoTestCase):
get_temp_file_path('external/pids'))
conf.set_override('host', host)
conf.set_override('agent_mode', agent_mode)
conf.set_override(
'root_helper', cfg.CONF.AGENT.root_helper, group='AGENT')
conf.set_override(
'root_helper_daemon', cfg.CONF.AGENT.root_helper_daemon,
group='AGENT')
return conf