Merge "Move router advertisement daemon restarts to privsep."

This commit is contained in:
Zuul 2019-08-20 04:56:59 +00:00 committed by Gerrit Code Review
commit 7e98253729
2 changed files with 10 additions and 5 deletions

View File

@ -1060,11 +1060,8 @@ interface %s
else:
LOG.debug('Pid %d is stale, relaunching radvd', pid)
cmd = ['radvd',
'-C', '%s' % _ra_file(dev, 'conf'),
'-p', '%s' % _ra_file(dev, 'pid')]
_execute(*cmd, run_as_root=True)
nova.privsep.linux_net.start_ra(_ra_file(dev, 'conf'),
_ra_file(dev, 'pid'))
def _host_lease(fixedip):

View File

@ -340,3 +340,11 @@ def _restart_dnsmasq_inner(flag_file, network_ref, config_file, pid_path,
cmd.append('--addn-hosts=%s' % hosts_path)
processutils.execute(*cmd)
@nova.privsep.sys_admin_pctxt.entrypoint
def start_ra(conf_path, pid_path):
cmd = ['radvd',
'-C', '%s' % conf_path,
'-p', '%s' % pid_path]
processutils.execute(*cmd)