Open vSwitch¶
This page is the starting point for Open vSwitch, the openvswitch role: the containers openvswitch_db and
openvswitch_vswitchd, on the compute and network nodes of the example inventory, selected by the tag openvswitch.
The play runs only while enable_ovs_dpdk is no; ovs-dpdk has its own play and tag (site.yml:546-566).
The risk register rates a restart or recreate of openvswitch_vswitchd Critical (R7).
The lists below say where the study covers how to operate it, its impact, its dependencies and the evidence, what to
check around a run and what stays open; the service card follows them.
Where to look¶
Operate¶
- Scenario: Reconfigure Neutron §4 (row "Open vSwitch"), Update container images §4 (OVS image change)
- Command: Reconfigure Neutron §1.1
- Command quick lookup by tag, row
-t openvswitch reconfigure: hosts touched with the default inventory: network, all computes; can restart, only if drift is detected: openvswitch_db/vswitchd; typical duration driver: the number of computes.
Impact and risk¶
Dependencies¶
- Dependencies: Component dependencies §2, Component dependencies §4
Evidence¶
- Fact sheet: – (
ovs-dpdk: fact sheet A §6) - Image side: Kolla images §5 (rows
openvswitch-*) - Also: handlers: Tags §5
Before and after a run¶
- Tags §3.1, row
openvswitch: safe on its own "yes if unchanged"; changed in 2023.1:system-idandhw-offloadare set through theopenvswitch_dbmodule inkolla_toolbox, and a change notifiesRestart openvswitch-vswitchd container(roles/openvswitch/tasks/post-config.yml:3-22) CODE; whether the module reports ok when the value is already set is NOT AVAILABLE (the module is not in these sources). Image changes per host batch; prerequisite: theopenvswitchkernel module. - R7, precautions: upgrade or recreate OVS host by host with evacuation or acceptance; never fleet-wide with serial 0.
- Update container images §4: an OVS image change recreates
openvswitch_vswitchdon every OVS host simultaneously (serial 0); NOT AVAILABLE whether VM networking is interrupted on every compute at the same time. Upgrade OVS per batch withANSIBLE_SERIAL=<n> kolla-ansible -t openvswitch upgrade, or use--limitbatches. - Reconfigure a single service
§3:
openvswitchis one of the tags that can restart the containers that Tags §3.1 traces to running VMs CODE; what those restarts do to running VMs is NOT AVAILABLE.
Known limits and open points¶
- Known bugs and limitations, row
openvswitch: the UssuriSet system-idcommand that always reported changed is gone; 2023.1 uses theopenvswitch_dbmodule and restartsopenvswitch_vswitchdwhen it reports changed (roles/openvswitch/tasks/post-config.yml:3-22) CODE. Whether it reports changed on an unchanged host: NOT AVAILABLE. - Known bugs and limitations, row
ovs-dpdk: thepullbug is fixed in 2023.1 (pullimportsservice-images-pull, which readsovsdpdk_servicesthroughkolla_role_name: "ovsdpdk";roles/ovs-dpdk/tasks/pull.yml:2-3,vars/main.yml:4,roles/service-images-pull/tasks/main.yml:14); the NIC mapping file is still written once (gen_configonly if the file is absent,roles/ovs-dpdk/files/ovs-dpdkctl.sh:350-353); the 300 s wait handler still has no port (roles/ovs-dpdk/handlers/main.yml:88-92), but the notify that should reach it is spelledwait for dpdk tunnel ipwhile the handler is namedWait for dpdk tunnel ip(roles/ovs-dpdk/handlers/main.yml:21, :88), so whether the wait runs at all, or the run fails on the missing handler, is NOT AVAILABLE; see fact sheet A §6. Status: CODE. - Q3: "Data-plane loss during an
openvswitch_vswitchdrestart or recreate". Status: NOT AVAILABLE. - What is not known, row "
openvswitch_vswitchdrestart or recreate": the sources do not establish whether the OpenFlow tables are lost, whether the OVS agent orovn-controllerreprograms them, and whether all VM traffic on the host is interrupted, and for how long. Same table: whether VM network traffic stops underkolla-ansible stop. - What is not known:
the sources do not establish whether services started by a shell wrapper that does not
execthem (neutron-l3-agent,haproxy,ovs-vswitchd,ovsdb-server) receive SIGTERM at all before the container stops;start-ovsrunsovs-vswitchdwithoutexec(roles/openvswitch/templates/start-ovs.j2:2). - Q14, answered from the source CODE: agent, OVS and OVN images have no
one-shot branch (no
KOLLA_BOOTSTRAP/KOLLA_UPGRADEin kolladocker/openvswitch/*). - F13, "The Nova deploy order" puts nova-compute before OVS and the Neutron agents on
new computes (
site.yml:544importsnova.ymlbefore the openvswitch play at:546) CODE; NOT AVAILABLE whether instances can be scheduled on such a compute before the later plays finish. - fact sheet A §6.8, "Operationally notable" for
the
ovs-dpdkrole (no fact sheet coversopenvswitch): anyovsdpdk-dbrestart also restartsovs-vswitchd; NIC rebinding and unit installation run on every deploy, reconfigure, upgrade and genconfig; sticky configuration. - Kolla images §6, item 13: an
openvswitch_vswitchdrestart replaces only the userspace daemon; the kernel module stays loaded andconf.dbkeeps bridges and ports CODE. NOT AVAILABLE Whether the OpenFlow tables are lost and must be reprogrammed by the OVS agent orovn-controller.
Service card¶
The rows of the card are explained in How to read a service card.
| Item | Value |
|---|---|
| Play | site.yml:546 |
| Tags | openvswitch |
| Play host patterns | openvswitch |
| Node types in play (example inventory) | compute, network |
| Node types running its containers | compute, network |
| Containers | openvswitch_db, openvswitch_vswitchd |
deploy/reconfigure flow (tasks/) |
config-host → config → check-containers → flush handlers → post-config |
| Task files | check-containers.yml, check.yml, config-host.yml, config.yml, config_validate.yml, deploy-containers.yml, deploy.yml, main.yml, post-config.yml, precheck.yml, pull.yml, reconfigure.yml, stop.yml, upgrade.yml |
| Templates | openvswitch-db-server.json.j2, openvswitch-vswitchd.json.j2, ovs-vsctl.j2, start-ovs.j2, start-ovsdb-server.j2 |
| Handlers (definition order) | Restart openvswitch-db-server container; Waiting for openvswitch_db service to be ready; Restart openvswitch-vswitchd container |
| Key variables | enable_openvswitch, neutron_bridge_name, neutron_external_interface, computes_need_external_bridge |
| Role dependencies | none |
Related¶
- Reconfigure Neutron —
-t neutrondoes not touch Open vSwitch, which has a separate play and tag - Update container images — what an OVS image change recreates, and how to batch it
- Component dependencies §4 —
openvswitch_dbandopenvswitch_vswitchdforward all VM traffic - Neutron —
neutron_openvswitch_agentprograms the OVS flows - OVN —
ovn_controllerprograms OVS from the SB DB - Components — the other component pages