From bf00f1d610cd3790ec32f2252e7bd2ecb4b10ed9 Mon Sep 17 00:00:00 2001 From: Jakob Englisch Date: Fri, 11 Jan 2019 19:45:49 +0100 Subject: [PATCH] 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 --- .../fix-l3-agent-ha-keepalive-helper-5f1f82c437c8a430.yaml | 3 +++ vars/main.yml | 2 ++ 2 files changed, 5 insertions(+) create mode 100644 releasenotes/notes/fix-l3-agent-ha-keepalive-helper-5f1f82c437c8a430.yaml diff --git a/releasenotes/notes/fix-l3-agent-ha-keepalive-helper-5f1f82c437c8a430.yaml b/releasenotes/notes/fix-l3-agent-ha-keepalive-helper-5f1f82c437c8a430.yaml new file mode 100644 index 00000000..42add161 --- /dev/null +++ b/releasenotes/notes/fix-l3-agent-ha-keepalive-helper-5f1f82c437c8a430.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Fixes neutron HA routers, by enabling ``neutron-l3-agent`` to invoke the required helper script. diff --git a/vars/main.yml b/vars/main.yml index ef54b996..ca20b7a5 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -380,6 +380,8 @@ neutron_services: service_conf_path: "{{ neutron_conf_dir }}" service_conf: l3_agent.ini 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" config_overrides: "{{ neutron_l3_agent_ini_overrides }}" config_type: "ini"