Skip to content
Snippets Groups Projects
Commit cf1a2a92 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Adds a wrapper script to run ovs-vsctl commands in the container"

parents fb447eb7 a8244348
No related branches found
No related tags found
No related merge requests found
...@@ -96,6 +96,8 @@ openvswitch_extra_volumes: "{{ default_extra_volumes }}" ...@@ -96,6 +96,8 @@ openvswitch_extra_volumes: "{{ default_extra_volumes }}"
openvswitch_db_extra_volumes: "{{ openvswitch_extra_volumes }}" openvswitch_db_extra_volumes: "{{ openvswitch_extra_volumes }}"
openvswitch_vswitchd_extra_volumes: "{{ openvswitch_extra_volumes }}" openvswitch_vswitchd_extra_volumes: "{{ openvswitch_extra_volumes }}"
openvswitch_ovs_vsctl_wrapper_enabled: false
############# #############
# OpenvSwitch # OpenvSwitch
############# #############
......
...@@ -52,3 +52,16 @@ ...@@ -52,3 +52,16 @@
- service.enabled | bool - service.enabled | bool
notify: notify:
- "Restart openvswitch-db-server container" - "Restart openvswitch-db-server container"
- name: Copying over ovs-vsctl wrapper
vars:
service: "{{ openvswitch_services['openvswitch-vswitchd'] }}"
template:
src: "ovs-vsctl.j2"
dest: "/usr/bin/ovs-vsctl"
mode: "0755"
become: true
when:
- service.host_in_groups | bool
- service.enabled | bool
- openvswitch_ovs_vsctl_wrapper_enabled | bool
#!/bin/bash
exec docker exec openvswitch_vswitchd ovs-vsctl "$@"
...@@ -54,6 +54,23 @@ libvirt as a host daemon. However, since the Yoga release, if a libvirt daemon ...@@ -54,6 +54,23 @@ libvirt as a host daemon. However, since the Yoga release, if a libvirt daemon
has already been set up, then Kolla Ansible may be configured to use it. This has already been set up, then Kolla Ansible may be configured to use it. This
may be achieved by setting ``enable_nova_libvirt_container`` to ``false``. may be achieved by setting ``enable_nova_libvirt_container`` to ``false``.
When the firewall driver is set to ``openvswitch``, libvirt will plug VMs
directly into the integration bridge, ``br-int``. To do this it uses the
``ovs-vsctl`` utility. The search path for this binary is controlled by the
``$PATH`` environment variable (as seen by the libvirt process). There are a
few options to ensure that this binary can be found:
* Set ``openvswitch_ovs_vsctl_wrapper_enabled`` to ``True``. This will install
a wrapper script to the path: ``/usr/bin/ovs-vsctl`` that will execute
``ovs-vsctl`` in the context of the ``openvswitch_vswitchd`` container. This
option is useful if you do not have openvswitch installed on the host. It
also has the advantage that the ``ovs-vsctl`` utility will match the version
of the server.
* Install openvswitch on the hypervisor. Kolla mounts ``/run/openvswitch`` from
the host into the ``openvswitch_vswitchd`` container. This means that socket
is in the location ``ovs-vsctl`` expects with its default options.
Migration from container to host Migration from container to host
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
......
---
features:
- |
Adds a new flag, ``openvswitch_ovs_vsctl_wrapper_enabled`` which will
install a wrapper script to ``/usr/bin/ovs-vsctl`` to docker exec into
the openvswitchd container.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment