From afbbec83a2578aac6aa0f16c205c5da3a788969b Mon Sep 17 00:00:00 2001 From: Edward Hope-Morley Date: Thu, 4 Apr 2019 14:22:54 +0100 Subject: [PATCH] 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 --- neutron/agent/l3/ha_router.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron/agent/l3/ha_router.py b/neutron/agent/l3/ha_router.py index 7cb6ade0b7a..5bd0b0bf7b6 100644 --- a/neutron/agent/l3/ha_router.py +++ b/neutron/agent/l3/ha_router.py @@ -364,6 +364,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, @@ -376,8 +377,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