[ovs-dev] [PATCH 0/3] OVN: add Controller Events

Lorenzo Bianconi lorenzo.bianconi at redhat.com
Fri Jun 14 15:53:20 UTC 2019


There are situations where arrival of certain types of traffic into OVS
does not warrant a "typical" action, such as output to a specific port
or dropping. Rather, the decision about what to do needs to be left to a
CMS.

The series here introduces a new table, Controller_Event, for this
purpose. Traffic into OVS can raise a controller() event that results in
a Controller_Event being written to the southbound database. The
intention is for a CMS to see the events and take some sort of action.
The "handled" column of the event is initially set to "false" by OVN.
When the CMS has seen the event and taken appropriate action, then the
CMS sets this field to "true'. When ovn-controller sees that the event
has been handled, it deletes the event from the database.

Controller events are only added to the southbound database if they have
been enabled in the nb_global table via the options:controller_event
setting.

This series introduces a new event, empty_lb_backends. This event is
raised if a received packet is destined for a load balancer VIP that has
no configured backend destinations. For this event, the event info
includes the load balancer VIP, the load balancer UUID, and the
transport protocol.

The use case for this particular event is for the CMS to supply backend
resources to handle this traffic. For example, in Openshift, this event
can be used to spin up new containers to handle the incoming traffic.

Changes since RFCv2:
- introduce event sequence number
- improve documentation

Changes since RFCv1:
- added garbage collector for event hash table
- rename send_event in trigger_event
- modify event_type from int to string in trigger_event action
- added chassis column in Controller_Event as weak reference to
  Chassis table
- added monitoring to 'local' rows in Controller_Event table
- fix typos

Lorenzo Bianconi (3):
  OVN: introduce Controller_Event table
  OVN: introduce send_event() action
  OVN: use send_event action to report 'empty_lb_rule' events

 include/ovn/actions.h           |  18 ++-
 include/ovn/logical-fields.h    |  26 ++++
 ovn/controller/lflow.c          |  26 +++-
 ovn/controller/ovn-controller.c |  10 ++
 ovn/controller/pinctrl.c        | 268 ++++++++++++++++++++++++++++++++
 ovn/controller/pinctrl.h        |   2 +
 ovn/lib/actions.c               | 176 +++++++++++++++++++++
 ovn/lib/ovn-l7.h                |  46 ++++++
 ovn/northd/ovn-northd.c         |  33 ++++
 ovn/ovn-nb.xml                  |   5 +
 ovn/ovn-sb.ovsschema            |  21 ++-
 ovn/ovn-sb.xml                  |  42 +++++
 ovn/utilities/ovn-trace.c       |   3 +
 tests/ovn.at                    |  78 ++++++++++
 tests/test-ovn.c                |  11 +-
 15 files changed, 756 insertions(+), 9 deletions(-)

-- 
2.21.0



More information about the dev mailing list