Use a separate dir for vhost_user sockets
Currently when OVS-DPDK is enabled, instances fail to spawn
due to permissions mismatch, see nova bug for details:
https://bugs.launchpad.net/nova/+bug/1670950
This patch updates openvswitch agent config to use a separate
directory for the sockets. Nova formula patch:
https://gerrit.mcp.mirantis.net/#/c/11213/ takes care
of creating the dir with proper permissions.
Corresponding reclass-system patch is:
https://gerrit.mcp.mirantis.net/13307/
Related-PROD: PROD-14413
Change-Id: I9fdc12ec4c99a517a1ea4e7aba86692529b76c96
diff --git a/README.rst b/README.rst
index c8ff890..0a06ec4 100644
--- a/README.rst
+++ b/README.rst
@@ -660,6 +660,7 @@
compute:
version: mitaka
dpdk: True
+ vhost_socket_dir: /var/run/openvswitch
backend:
engine: ml2
...
diff --git a/neutron/files/mitaka/openvswitch_agent.ini b/neutron/files/mitaka/openvswitch_agent.ini
index 01162a0..25ecbbd 100644
--- a/neutron/files/mitaka/openvswitch_agent.ini
+++ b/neutron/files/mitaka/openvswitch_agent.ini
@@ -217,6 +217,9 @@
# OVS vhost-user socket directory. (string value)
#vhostuser_socket_dir = /var/run/openvswitch
+{%- if neutron.vhost_socket_dir is defined %}
+vhostuser_socket_dir = {{ neutron.vhost_socket_dir }}
+{%- endif %}
# Address to listen on for OpenFlow connections. Used only for 'native' driver. (IP address value)
#of_listen_address = 127.0.0.1
diff --git a/neutron/files/newton/openvswitch_agent.ini b/neutron/files/newton/openvswitch_agent.ini
index 01162a0..25ecbbd 100644
--- a/neutron/files/newton/openvswitch_agent.ini
+++ b/neutron/files/newton/openvswitch_agent.ini
@@ -217,6 +217,9 @@
# OVS vhost-user socket directory. (string value)
#vhostuser_socket_dir = /var/run/openvswitch
+{%- if neutron.vhost_socket_dir is defined %}
+vhostuser_socket_dir = {{ neutron.vhost_socket_dir }}
+{%- endif %}
# Address to listen on for OpenFlow connections. Used only for 'native' driver. (IP address value)
#of_listen_address = 127.0.0.1
diff --git a/neutron/files/ocata/openvswitch_agent.ini b/neutron/files/ocata/openvswitch_agent.ini
index a8eecc4..a8ae0d2 100644
--- a/neutron/files/ocata/openvswitch_agent.ini
+++ b/neutron/files/ocata/openvswitch_agent.ini
@@ -276,6 +276,9 @@
# OVS vhost-user socket directory. (string value)
#vhostuser_socket_dir = /var/run/openvswitch
+{%- if neutron.vhost_socket_dir is defined %}
+vhostuser_socket_dir = {{ neutron.vhost_socket_dir }}
+{%- endif %}
# Address to listen on for OpenFlow connections. Used only for 'native' driver.
# (IP address value)