[ovs-git] [ovn-org/ovn] b6b382: ovn-controller: Fix I-P for SB Port_Binding and OV...

Dumitru Ceara noreply at github.com
Wed Jun 10 17:49:50 UTC 2020


  Branch: refs/heads/master
  Home:   https://github.com/ovn-org/ovn
  Commit: b6b3823d467941d65cb2f9e28d5572566bb87540
      https://github.com/ovn-org/ovn/commit/b6b3823d467941d65cb2f9e28d5572566bb87540
  Author: Dumitru Ceara <dceara at redhat.com>
  Date:   2020-06-10 (Wed, 10 Jun 2020)

  Changed paths:
    M controller/binding.c
    M controller/binding.h
    M controller/ovn-controller.c
    M tests/ovn-macros.at
    M tests/ovn.at

  Log Message:
  -----------
  ovn-controller: Fix I-P for SB Port_Binding and OVS Interface.

The commit that introduced incremental processing for Port_Binding and
OVS Interface in the I-P runtime_data node covered most cases but two
were missed:

1. If a Port_Binding was already claimed by the local hypervisor when
ovn-controller starts, binding_handle_port_binding_changes doesn't
correctly set the "changed" variable causing en_runtime_data node to
go to EN_VALID instead of EN_UPDATED. Due to this update_sb_monitors()
is skipped in that run and ovn-controller does not register for
updates regarding the datapath containing the Port_Binding.

2. If a Port_Binding was already claimed by the local hypervisor when
ovn-controller starts, but the underlying OVS interface was removed in
the meantime, handle_updated_vif_lport() would fail the assertion that a
local_binding should exist in memory.

To address the first issue, we now explicitly track changes to the binding
context local_lport and local_lport_ids sets. If these change during
incremental processing of the runtime_data OVS_Interface and
SB_Port_Binding input nodes then the runtime_data node should change
state to EN_UPDATED.

For the second issue, we now allow the case when a stale port_binding is
released.

Also, added an explicit non_vif_ports_changed variable to
binding_ctx_out to track if other types of Port_Bindings
have been changed in the current run. This kind of update should also
cause runtime_data to move to EN_UPDATED such that update_sb_monitors()
gets executed.

The commit also adds two test cases to cover the above scenarios and
changes the way unit tests attach hypervisors in such way that a unit
test can first configure br-int interfaces, even if ovn-controller
hasn't started yet.

Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2020-June/371499.html
CC: Numan Siddique <numans at ovn.org>
Fixes: 354bdba51abf ("ovn-controller: I-P for SB port binding and OVS interface in runtime_data.")
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <numans at ovn.org>




More information about the git mailing list