From a25da709b966ae71a46d3474707d83e8482f599e Mon Sep 17 00:00:00 2001 From: Alexey Perevalov Date: Thu, 13 Sep 2018 04:25:11 -0400 Subject: [PATCH] Use /var/run instead of /var/run/openvswitch /var/run/openvswitch was necessary for ovs-vsctl work, it should have access do openvswitch/db.sock. But supporting vhostuser ports requires to move socket from /var/run/openvswitch to another directory. This another directory should be on the same mount point on host as well as docker's overlay fs. Change-Id: I572bdcb365e34cea481f42b94d9be0748e0d5c93 Signed-off-by: Alexey Perevalov --- .zuul.d/sdn.yaml | 2 +- devstack/lib/kuryr_kubernetes | 8 ++++---- devstack/local.conf.ovn.sample | 6 +++--- devstack/local.conf.sample | 4 ++-- devstack/settings | 2 +- doc/source/installation/containerized.rst | 9 +++++++++ 6 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.zuul.d/sdn.yaml b/.zuul.d/sdn.yaml index 17c4af0a3..25034021e 100644 --- a/.zuul.d/sdn.yaml +++ b/.zuul.d/sdn.yaml @@ -26,7 +26,7 @@ neutron: https://git.openstack.org/openstack/neutron vars: devstack_localrc: - OVS_HOST_PATH: /usr/local/var/run/openvswitch + VAR_RUN_PATH: /usr/local/var/run Q_USE_PROVIDERNET_FOR_PUBLIC: true PHYSICAL_NETWORK: public OVN_L3_CREATE_PUBLIC_NETWORK: true diff --git a/devstack/lib/kuryr_kubernetes b/devstack/lib/kuryr_kubernetes index a001a01de..8e2693cdc 100644 --- a/devstack/lib/kuryr_kubernetes +++ b/devstack/lib/kuryr_kubernetes @@ -663,10 +663,10 @@ spec: - name: proc mountPath: /host_proc EOF - if [[ -n "$OVS_HOST_PATH" ]]; then + if [[ -n "$VAR_RUN_PATH" ]]; then cat >> "${output_dir}/cni_ds.yml" << EOF - name: openvswitch - mountPath: /var/run/openvswitch + mountPath: /var/run EOF fi if [ "$cni_daemon" == "True" ]; then @@ -700,11 +700,11 @@ EOF hostPath: path: /proc EOF - if [[ -n "$OVS_HOST_PATH" ]]; then + if [[ -n "$VAR_RUN_PATH" ]]; then cat >> "${output_dir}/cni_ds.yml" << EOF - name: openvswitch hostPath: - path: ${OVS_HOST_PATH} + path: ${VAR_RUN_PATH} EOF fi } diff --git a/devstack/local.conf.ovn.sample b/devstack/local.conf.ovn.sample index 38907aa43..bee680a05 100644 --- a/devstack/local.conf.ovn.sample +++ b/devstack/local.conf.ovn.sample @@ -36,10 +36,10 @@ enable_service networking-ovn-metadata-agent enable_service neutron enable_service q-svc -# OVS HOST PATH +# VAR RUN PATH # ============= -# OVS_HOST_PATH=/var/run/openvswitch -OVS_HOST_PATH=/usr/local/var/run/openvswitch +# VAR_RUN_PATH=/var/run +VAR_RUN_PATH=/usr/local/var/run # OCTAVIA KURYR_K8S_LBAAS_USE_OCTAVIA=True diff --git a/devstack/local.conf.sample b/devstack/local.conf.sample index 265ddce58..1f429b24a 100644 --- a/devstack/local.conf.sample +++ b/devstack/local.conf.sample @@ -33,9 +33,9 @@ enable_service q-dhcp enable_service q-l3 enable_service q-svc -# OVS HOST PATH +# VAR RUN PATH # ============= -# OVS_HOST_PATH=/var/run/openvswitch +# VAR_RUN_PATH=/var/run # OCTAVIA KURYR_K8S_LBAAS_USE_OCTAVIA=True diff --git a/devstack/settings b/devstack/settings index 590d6475d..ae3dea66e 100644 --- a/devstack/settings +++ b/devstack/settings @@ -91,7 +91,7 @@ KURYR_VIF_POOL_MANAGER=${KURYR_VIF_POOL_MANAGER:-False} KURYR_HEALTH_SERVER_PORT=${KURYR_HEALTH_SERVER_PORT:-8082} # OVS HOST PATH -OVS_HOST_PATH=${OVS_HOST_PATH:-/var/run/openvswitch} +VAR_RUN_PATH=${VAR_RUN_PATH:-/var/run} # Health Server KURYR_CNI_HEALTH_SERVER_PORT=${KURYR_CNI_HEALTH_SERVER_PORT:-8090} diff --git a/doc/source/installation/containerized.rst b/doc/source/installation/containerized.rst index 4bf380385..5de9d85be 100644 --- a/doc/source/installation/containerized.rst +++ b/doc/source/installation/containerized.rst @@ -108,6 +108,15 @@ This should generate 5 files in your ````: * controller_deployment.yml * cni_ds.yml +.. note:: + kuryr-cni daemonset mounts /var/run, due to necessity of accessing to several sub directories + like openvswitch and auxiliary directory for vhostuser configuration and socket files. Also when + neutron-openvswitch-agent works with datapath_type = netdev configuration option, kuryr-kubernetes + has to move vhostuser socket to auxilary directory, that auxiliary directory should be on the same + mount point, otherwise connection of this socket will be refused. + In case when Open vSwitch keeps vhostuser socket files not in /var/run/openvswitch, openvswitch + mount point in cni_ds.yaml and [vhostuser] section in config_map.yml should be changed properly. + Deploying Kuryr resources on Kubernetes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~