[ovs-git] [openvswitch/ovs] 34b1a4: ovn-controller: Fix the chassis row recreation issue

damijans noreply at github.com
Thu Aug 8 17:06:32 UTC 2019


  Branch: refs/heads/branch-2.12
  Home:   https://github.com/openvswitch/ovs
  Commit: 34b1a4f4c2235fd0f4cc2e50e1ca7a466dc457f4
      https://github.com/openvswitch/ovs/commit/34b1a4f4c2235fd0f4cc2e50e1ca7a466dc457f4
  Author: Numan Siddique <nusiddiq at redhat.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/controller/chassis.c
    M tests/ovn-controller.at

  Log Message:
  -----------
  ovn-controller: Fix the chassis row recreation issue

Before the commit [1], ovn-controller would always recreate its
chassis row if deleted externally. After this commit, it no longer
recreates it. This is regression and needs to be fixed.

[1] - 242f1799fc22("ovn-controller: Refactor chassis.c to abstract the string parsing")

Fixes: 242f1799fc22("ovn-controller: Refactor chassis.c to abstract the string parsing")

Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit b114775978a501dabd08bb15192940e574d45420)


  Commit: 6299ac47e962e22fbbfafd7da3f198175d09e34d
      https://github.com/openvswitch/ovs/commit/6299ac47e962e22fbbfafd7da3f198175d09e34d
  Author: Numan Siddique <nusiddiq at redhat.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/northd/ovn-northd.8.xml
    M ovn/northd/ovn-northd.c
    M tests/ovn-northd.at

  Log Message:
  -----------
  ovn-northd: Add the option to pause and resume

This patch adds 3 unixctl socket comments - pause, resume and is-paused.

Usage: ovs-appctl -t ovn-northd pause/resume/is-paused

This feature will be useful if the CMS wants to
  - deploy OVN DB servers in active/passive mode and
  - run ovn-northd on all these nodes and use unix ctl sockets to
    connect to the local OVN DB servers.

On the nodes where OVN Db ovsdb-servers are in passive mode, the local ovn-northds
will process the DB changes and compute logical flows to be thrown out later,
because write transactions are not allowed by these ovsdb-servers. It results in
unncessary CPU usage.

With these commands, CMS can pause ovn-northd on these node. A node
which becomes master, can resume the ovn-northd.

One use case is to use this feature in ovn-kubernetes with the above deployment model.

Acked-by: Mark Michelson <mmichels at redhat.com>
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn commit 03894e3e2374069c06ae97dafb24fb4fcb8c8e61)


  Commit: cf32555586e75c0712ef620b54bac1d34f765380
      https://github.com/openvswitch/ovs/commit/cf32555586e75c0712ef620b54bac1d34f765380
  Author: Daniel Alvarez <dalvarez at redhat.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/northd/ovn-northd.c

  Log Message:
  -----------
  OVN: Don't emit ICMP need to frag on LRP with no IPv4 address

Prior to this patch, when a LRP has only IPv6 addresses, ovn-northd
will crash (SIGSEV) because the current code injects a flow to
emit the ICMP need-to-frag from its IPv4 address which does not
exist.

This patch is adding a check to skip the flow installation in case
the port does not have any IPv4 address.

Signed-off-by: Daniel Alvarez <dalvarez at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit 7c311c9956650fedd6cb5b38ae836766444721f3)


  Commit: 40f0cc7bc07af52808717780b72a6b4fd48a58b1
      https://github.com/openvswitch/ovs/commit/40f0cc7bc07af52808717780b72a6b4fd48a58b1
  Author: Han Zhou <hzhou8 at ebay.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/controller/ofctrl.c
    M ovn/controller/ofctrl.h
    M ovn/controller/ovn-controller.c
    M ovn/lib/inc-proc-eng.c
    M ovn/lib/inc-proc-eng.h

  Log Message:
  -----------
  ovn-controller: Fix flow installation latency caused by recompute.

When there are in-flight flow-installations pending to ovs-vswitchd,
current incremental processing logic prioritizes new change handling.
However, in scenarios where frequent recomputes are triggered, the
later recompute would block the flow-installation for previously
computed flows because recompute usually takes long time, especially
when there are large number of flows. This results in worse latency
than the version without incremental processing in specific scale
test scenarios.

While we can simply fix the problem by prioritizing flow installation
rather than new change handling, it can cause the incremental
processing to degrade to always recompute in certain scenarios when
there are some changes triggering recomputes, followed by a lot of
continously coming changes that can be handled incrementally. Because
OVSDB change tracker cannot preserve changes across iterations, once
the recompute is triggered and resulted in a lot of pending messages
to ovs-vswitchd, and if we choose to skip the engine_run()
in the next iteration when a incrementally processible change comes,
we miss the opportunity to handle that tracked change and will have
to trigger recompute again in the next next iteration, and so on, if
such changes come continously.

This patch solves the problem by introducing engine_set_abort_recompute(),
so that we can prioritize new change handling if the change can be
incrementally processed, but if the change triggers recompute, we
abort there without spending CPU on the recompute to avoid blocking
the previous computed flow installation.

Reported-by: Daniel Alvarez Sanchez <dalvarez at redhat.com>
Reported-by: Numan Siddique <nusiddiq at redhat.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-discuss/2019-June/048822.html
Tested-by: Numan Siddique <nusiddiq at redhat.com>
Acked-by: Numan Siddique <nusiddiq at redhat.com>
Acked-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit a6b7d9f4f04799ad90c2de4480baaf92ecabb947)


  Commit: 2edb4f4d5993c03b65e02eb9041923491a3ca65e
      https://github.com/openvswitch/ovs/commit/2edb4f4d5993c03b65e02eb9041923491a3ca65e
  Author: Dumitru Ceara <dceara at redhat.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/controller/ovn-controller.c

  Log Message:
  -----------
  ovn-controller: Fix IP engine run with in-flight messages

When trying to incrementally process changes even if there are in-flight
messages we were incorrectly setting the engine_aborted variable to the
value returned by engine_run. However, engine_run returns true if the
run was completed.

This was causing discrepancies between logical flows and openflow flows
due to the fact that the rerun wasn't happening after an aborted run.

In order to avoid confusion the engine_aborted variable is now renamed to
engine_run_done thus avoiding the negated logic.

CC: Han Zhou <hzhou8 at ebay.com>
Fixes: a6b7d9f4f047 ("ovn-controller: Fix flow installation latency caused by
recompute.")
Acked-by: Han Zhou <hzhou8 at ebay.com>
Acked-by: Mark Michelson <mmichels at redhat.com>
Tested-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit fc1e1640cd47f255c68488b0ec36052b0af58fd2)


  Commit: c4575c184c446ef1d4d3115f4fb240999ac98902
      https://github.com/openvswitch/ovs/commit/c4575c184c446ef1d4d3115f4fb240999ac98902
  Author: Han Zhou <zhouhan at gmail.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

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

  Log Message:
  -----------
  ovn-controller: Fix inject-pkt command error response.

When using unixctl command inject-packet, it always respond with
failure "server not ready", although the command was actually executed
successfully.

Fixes: 0bd4d85c36ef ("ovn-controller: Initial use of incremental engine - quiet mode.")
Signed-off-by: Han Zhou <hzhou8 at ebay.com>
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit 870a6b7ca1549a3195eaad9accc9e65aa8b11668)


  Commit: 629850bfb973f9761b36abaf64bd69ece604f962
      https://github.com/openvswitch/ovs/commit/629850bfb973f9761b36abaf64bd69ece604f962
  Author: Numan Siddique <nusiddiq at redhat.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/controller/pinctrl.c
    M ovn/lib/actions.c
    M tests/ovn.at

  Log Message:
  -----------
  ovn-controller: Encode the virtual port key in vport_bind action in network byte order

The commit [1] encoded the vport key using uint32_t and the test case
"action parsing" is failing for s380 arch.

This patch fixes this issue by encoding the vport key in the network byte
order.

[1] - 054f4c85c413("Add a new logical switch port type - 'virtual'")
Fixes: 054f4c85c413("Add a new logical switch port type - 'virtual'")

Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry-picked from ovn commit - 3c39d74444e21f6c24acfc9f934ee01263fa0dc3)


  Commit: 5a9ee881cc11dffaf7f79d08d500de0351c15180
      https://github.com/openvswitch/ovs/commit/5a9ee881cc11dffaf7f79d08d500de0351c15180
  Author: Damijan Skvarc <damjan.skvarc at gmail.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/northd/ovn-northd.c

  Log Message:
  -----------
  ovn-northd: fixed memory leak in ovn_port_update_sbrec()

Memory leak happens because of redundand memory allocation for array
of single pointer. Issue was solved by removing this redundand allocation
and using address of pointer to created chassis sb_ha_entity instead.

Signed-off-by: Damijan Skvarc <damjan.skvarc at gmail.com>
Acked-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Numan Siddique <nusiddiq at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry-picked from ovn commit 800c4f338411c41d4d15d76073b8472f98f5a044)


  Commit: 14888212244dd2040c9b3ccf1f86ab67aebbe9b2
      https://github.com/openvswitch/ovs/commit/14888212244dd2040c9b3ccf1f86ab67aebbe9b2
  Author: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/utilities/ovn-nbctl.c
    M tests/ovn-nbctl.at

  Log Message:
  -----------
  OVN: fix default L4 default proto reported by ovn-nbctl

If no protcol is specified defining a load balancing rule TCP is
selected as default but ovn-nbctl lb-list reports 'tcp/udp' in this
case. Fix it reporting tcp in this case

Fixes: e2bfcad6cbb0 ("ovn-nbctl: Add LB commands")
Acked-by: Dumitru Ceara <dceara at redhat.com>
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi at redhat.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit 04e10d14529732dd4b94ce7f5c6a07bfdd8da3c2)


  Commit: ee2bb0f2f9893d6d21d843d44e50ef13c25ce15c
      https://github.com/openvswitch/ovs/commit/ee2bb0f2f9893d6d21d843d44e50ef13c25ce15c
  Author: Damijan Skvarc <damjan.skvarc at gmail.com>
  Date:   2019-08-08 (Thu, 08 Aug 2019)

  Changed paths:
    M ovn/northd/ovn-northd.c

  Log Message:
  -----------
  ovn-northd: fix memory leak in add_distributed_nat_routes() function

Within this function actions & match dynamic strings are used as helper
variables for adding entries into logical flow table. Variables are
used several times in order to optimize number of memory allocations,
however at the end memory was forgotten to be deallocated.

Signed-off-by: Damijan Skvarc <damjan.skvarc at gmail.com>
Signed-off-by: Justin Pettit <jpettit at ovn.org>

(cherry picked from ovn repo commit c1ba3f68a78af3b852aa5709a0d96f001b63b243)


Compare: https://github.com/openvswitch/ovs/compare/97c95d78e161...ee2bb0f2f989


More information about the git mailing list