ovn: Mount /run instead of /run/openvswitch when starting ovn-controller container

Presently ovn-controller container is started with "-v /run/openvswitch:/run/openvswitch".
The openvswitch systemd script deletes the /run/openvswitch folder when stopping it in the host.
/run/openvswitch path inside the ovn-controller container becomes a stale directory.
And when the service is started again, it creates the folder again. In order for ovn-controller
to access again, the folder has to be remounted or the ovn-controller container should be
restarted.

As a temporary fix, this patch mounts /run so that when /run/openvswitch is created again, it will
get reflected inside the ovn-controller container. The proper fix has to come from openvswitch
systemd script to not delete /run/openvswitch when stopping the service. This is presently
discusses in OVS mailing list [1], but no proper solution has been arrived yet.

[1] - https://mail.openvswitch.org/pipermail/ovs-dev/2018-March/345589.html
Closes-bug: #1764745
Change-Id: I032571cec49537cac972ebbbb44733ea17c299fa
This commit is contained in:
Numan Siddique 2018-04-17 18:53:08 +05:30
parent 70700644b0
commit 49963bc180

@ -111,7 +111,10 @@ outputs:
volumes:
- /var/lib/kolla/config_files/ovn_controller.json:/var/lib/kolla/config_files/config.json:ro
- /lib/modules:/lib/modules:ro
- /run/openvswitch:/run/openvswitch
# TODO(numans): This is temporary. Mount /run/openvswitch once
# openvswitch systemd script is fixed to not delete /run/openvswitch
# folder in the host when openvswitch service is stopped.
- /run:/run
- /var/log/containers/openvswitch:/var/log/openvswitch
environment:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS