Fix the subprocess invocation of neutron-l3-agent

neutron-l3-agent tries to invoke neutron-keepalived-state-change
from it's PATH. The venv's bin directory is not part of the
default PATH of the neutron-l3-agent, hence the invocation fails.
This change adds the venv's bin directory to the PATH of
neutron-l3-agent.

To the best of my knowledge this is currently the only script
which is invoked and shipped by neutron itself [1]. Neutron expects
quite a few binaries in it's PATH, however other expected binaries
are typically system packages (e.g. radvd) [2].

Sadly, the PATH can not easily be extended, hence all non venv-bin
directories from the PATH are a 'one-time snapshot' from a quite
common set of directories across all common linux distributions.

[1]
https://github.com/openstack/neutron/search?q=%22cmd+%3D+%27neutron-%22&unscoped_q=%22cmd+%3D+%27neutron-%22
[2]
https://github.com/openstack/neutron/search?q=external_process.ProcessManager&unscoped_q=external_process.ProcessManager

Depends-On: I504a8270be1ddf2f24ab3ad3b4f2f4ca9c990470
Change-Id: I38bb573468dd4c57523cc1a5ff2448009ee2b216
This commit is contained in:
Jakob Englisch 2019-01-11 19:45:49 +01:00
parent 7bbbd1f3e0
commit bf00f1d610
2 changed files with 5 additions and 0 deletions

View File

@ -0,0 +1,3 @@
---
fixes:
- Fixes neutron HA routers, by enabling ``neutron-l3-agent`` to invoke the required helper script.

View File

@ -380,6 +380,8 @@ neutron_services:
service_conf_path: "{{ neutron_conf_dir }}" service_conf_path: "{{ neutron_conf_dir }}"
service_conf: l3_agent.ini service_conf: l3_agent.ini
service_rootwrap: rootwrap.d/l3.filters service_rootwrap: rootwrap.d/l3.filters
environment:
PATH: "{{ neutron_bin }}:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
execstarts: "{{ neutron_bin }}/neutron-l3-agent --config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/l3_agent.ini --log-file={{ neutron_log_dir }}/neutron-l3-agent.log" execstarts: "{{ neutron_bin }}/neutron-l3-agent --config-file {{ neutron_conf_dir }}/neutron.conf --config-file {{ neutron_conf_dir }}/l3_agent.ini --log-file={{ neutron_log_dir }}/neutron-l3-agent.log"
config_overrides: "{{ neutron_l3_agent_ini_overrides }}" config_overrides: "{{ neutron_l3_agent_ini_overrides }}"
config_type: "ini" config_type: "ini"