Don't pass None arg to neutron-keepalived-state-change

The original fix for bug 1818614 added two new cli args
when spawning neutron-keepalived-state-change but if
e.g. self.agent_conf.AGENT.root_helper_daemon is unset
then "None" string is passed which breaks the
neutron-keepalived-state-change daemon.

Change-Id: I4afcdbbf2f3d2dafcad241ba3fc0778b52b8fc85
Related-Bug: #1818614
Related-Bug: #1823038
(cherry picked from commit afbbec83a2)
(cherry picked from commit a7df1c458c)
(cherry picked from commit 279c99ab7d)
This commit is contained in:
Edward Hope-Morley 2019-04-04 14:22:54 +01:00
parent 1cf12dfd38
commit 21387750a9
1 changed files with 2 additions and 2 deletions

View File

@ -361,6 +361,7 @@ 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,8 +374,7 @@ class HaRouter(router.RouterInfo):
'--user=%s' % os.geteuid(),
'--group=%s' % os.getegid(),
'--AGENT-root_helper=%s' % self.agent_conf.AGENT.root_helper,
'--AGENT-root_helper_daemon=%s' %
self.agent_conf.AGENT.root_helper_daemon]
'--AGENT-root_helper_daemon=%s' % root_helper_daemon]
return cmd
return callback