diff --git a/neutron/agent/linux/external_process.py b/neutron/agent/linux/external_process.py index e8437336ae8..5a82f3fdc2d 100644 --- a/neutron/agent/linux/external_process.py +++ b/neutron/agent/linux/external_process.py @@ -128,8 +128,9 @@ class ProcessManager(MonitoredProcess): def get_kill_cmd(self, sig, pid): if self.kill_scripts_path: kill_file = "%s-kill" % self.service - if os.path.isfile(os.path.join(self.kill_scripts_path, kill_file)): - return [kill_file, sig, pid] + kill_file_path = os.path.join(self.kill_scripts_path, kill_file) + if os.path.isfile(kill_file_path): + return [kill_file_path, sig, pid] return ['kill', '-%s' % (sig), pid] def get_pid_file_name(self): diff --git a/neutron/tests/unit/agent/linux/test_external_process.py b/neutron/tests/unit/agent/linux/test_external_process.py index d2aa240098a..3821a30b7b7 100644 --- a/neutron/tests/unit/agent/linux/test_external_process.py +++ b/neutron/tests/unit/agent/linux/test_external_process.py @@ -271,7 +271,8 @@ class TestProcessManager(base.BaseTestCase): kill_scripts_path='test-path/'): cfg.CONF.set_override("kill_scripts_path", kill_scripts_path, "AGENT") if kill_script_exists: - expected_cmd = ['test-service-kill', '9', 4] + expected_cmd = [ + os.path.join(kill_scripts_path, 'test-service-kill'), '9', 4] else: expected_cmd = ['kill', '-9', 4]