mbox series

[ovs-dev,v7,0/5] Add DDlog implementation of ovn-northd

Message ID 20201119051308.27913-1-blp@ovn.org
Headers show
Series Add DDlog implementation of ovn-northd | expand

Message

Ben Pfaff Nov. 19, 2020, 5:13 a.m. UTC
v1->v2:
  - Applied several patches.
  - New commit to add documentation for the system-userspace testsuite.
  - New patches to improve the testsuite a couple of ways.
  - Revised "Prepare for multiple northd types" to fix system-userspace
    testsuite.
  - Updated DDlog implementation of northd to match latest master.
  - Updated copyright notices in DDlog implementation.

v2->v3:
  - Applied documentation patch.
  - Added some test improvements to fix reported problems.
  - Really updated copyright notices (didn't commit, last time).
  - Correctly skip ddlog tests when ddlog not compiled.

v3->v4:
  - Fix dependencies for parallel build.
  - Fix spelling error in documentation.
  - Use --wait=sb, not --wait=hv, when no chassis are running.
  - Fixed IGMP and MLD tests by porting commit 9d2e8d32fb98
    ("ofctrl.c: Fix duplicated flow handling in I-P while merging
    opposite changes."), which I had missed before.

v4.1->v5:
  - Drop patch for ACL log meters (this was included in v4.1 by mistake).
  - In addition to waiting for database, also wait for ports to come up.
  - New patch to support more arguments to wait_for_row_count that waiting
    for ports indirectly needed.
  - Port commit c29221d9322a ("Allow VLAN traffic when LS:vlan-passthru=true").
  - Port commit 36a8745de859 ("Add support for DHCP options 28 (Broadcast Address)")
  - Add patch to improve "ARP/ND request broadcast limiting" test.

v5->v6:
  - Applied and dropped patch for "test a == b".
  - Applied and dropped patch to allow more args to wait_for_row_count().
  - Applied and dropped ARP/ND broadcast test improvement patch.
  - Fix whitespace in patch to export ddlog_warn() and ddlog_err().

v6->v7:
  - Fixed "make dist" (thanks to Numan for reporting this.)
  - Fix probe interval setting (thanks to Numan again).
  - Small amount of improvement of OVN DDlog code (use lambdas in more places).
  - Fine-tuning of ovn-northd-ddlog code for jsonrpc session usage.
  - Fix newline issues in tests reported by Dumitru.
  - Add ack from Dumitru.

Ben Pfaff (3):
  tests: Prepare for multiple northd types.
  tests: Eliminate most "sleep" calls.
  tests: Improve debuggability of tests.

Leonid Ryzhyk (2):
  Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog
  ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.

 Documentation/automake.mk                     |    2 +
 Documentation/intro/install/general.rst       |   31 +-
 Documentation/topics/debugging-ddlog.rst      |  280 +
 Documentation/topics/index.rst                |    1 +
 Documentation/tutorials/ddlog-new-feature.rst |  362 +
 Documentation/tutorials/index.rst             |    1 +
 NEWS                                          |    6 +
 TODO.rst                                      |    6 +
 acinclude.m4                                  |   43 +
 configure.ac                                  |    5 +
 lib/ovn-util.c                                |   15 +
 lib/ovn-util.h                                |    5 +
 m4/ovn.m4                                     |   16 +
 northd/.gitignore                             |    4 +
 northd/automake.mk                            |  104 +
 northd/helpers.dl                             |   89 +
 northd/ipam.dl                                |  506 ++
 northd/lrouter.dl                             |  715 ++
 northd/lswitch.dl                             |  643 ++
 northd/multicast.dl                           |  259 +
 northd/ovn-nb.dlopts                          |   13 +
 northd/ovn-northd-ddlog.c                     | 1749 ++++
 northd/ovn-sb.dlopts                          |   28 +
 northd/ovn.dl                                 |  384 +
 northd/ovn.rs                                 |  857 ++
 northd/ovn.toml                               |    2 +
 northd/ovn_northd.dl                          | 7483 +++++++++++++++++
 northd/ovsdb2ddlog2c                          |  127 +
 tests/atlocal.in                              |    7 +
 tests/ovn-controller-vtep.at                  |    6 +-
 tests/ovn-ic.at                               |   11 +-
 tests/ovn-macros.at                           |  114 +-
 tests/ovn-northd.at                           |  387 +-
 tests/ovn.at                                  |  887 +-
 tests/ovs-macros.at                           |   43 +-
 tests/system-ovn.at                           |  122 +-
 tutorial/ovs-sandbox                          |   24 +-
 utilities/checkpatch.py                       |    2 +-
 utilities/ovn-ctl                             |   20 +-
 39 files changed, 14791 insertions(+), 568 deletions(-)
 create mode 100644 Documentation/topics/debugging-ddlog.rst
 create mode 100644 Documentation/tutorials/ddlog-new-feature.rst
 create mode 100644 northd/helpers.dl
 create mode 100644 northd/ipam.dl
 create mode 100644 northd/lrouter.dl
 create mode 100644 northd/lswitch.dl
 create mode 100644 northd/multicast.dl
 create mode 100644 northd/ovn-nb.dlopts
 create mode 100644 northd/ovn-northd-ddlog.c
 create mode 100644 northd/ovn-sb.dlopts
 create mode 100644 northd/ovn.dl
 create mode 100644 northd/ovn.rs
 create mode 100644 northd/ovn.toml
 create mode 100644 northd/ovn_northd.dl
 create mode 100755 northd/ovsdb2ddlog2c

Comments

Numan Siddique Nov. 19, 2020, 7:23 a.m. UTC | #1
On Thu, Nov 19, 2020 at 10:43 AM Ben Pfaff <blp@ovn.org> wrote:
>
> v1->v2:
>   - Applied several patches.
>   - New commit to add documentation for the system-userspace testsuite.
>   - New patches to improve the testsuite a couple of ways.
>   - Revised "Prepare for multiple northd types" to fix system-userspace
>     testsuite.
>   - Updated DDlog implementation of northd to match latest master.
>   - Updated copyright notices in DDlog implementation.
>
> v2->v3:
>   - Applied documentation patch.
>   - Added some test improvements to fix reported problems.
>   - Really updated copyright notices (didn't commit, last time).
>   - Correctly skip ddlog tests when ddlog not compiled.
>
> v3->v4:
>   - Fix dependencies for parallel build.
>   - Fix spelling error in documentation.
>   - Use --wait=sb, not --wait=hv, when no chassis are running.
>   - Fixed IGMP and MLD tests by porting commit 9d2e8d32fb98
>     ("ofctrl.c: Fix duplicated flow handling in I-P while merging
>     opposite changes."), which I had missed before.
>
> v4.1->v5:
>   - Drop patch for ACL log meters (this was included in v4.1 by mistake).
>   - In addition to waiting for database, also wait for ports to come up.
>   - New patch to support more arguments to wait_for_row_count that waiting
>     for ports indirectly needed.
>   - Port commit c29221d9322a ("Allow VLAN traffic when LS:vlan-passthru=true").
>   - Port commit 36a8745de859 ("Add support for DHCP options 28 (Broadcast Address)")
>   - Add patch to improve "ARP/ND request broadcast limiting" test.
>
> v5->v6:
>   - Applied and dropped patch for "test a == b".
>   - Applied and dropped patch to allow more args to wait_for_row_count().
>   - Applied and dropped ARP/ND broadcast test improvement patch.
>   - Fix whitespace in patch to export ddlog_warn() and ddlog_err().
>
> v6->v7:
>   - Fixed "make dist" (thanks to Numan for reporting this.)
>   - Fix probe interval setting (thanks to Numan again).
>   - Small amount of improvement of OVN DDlog code (use lambdas in more places).
>   - Fine-tuning of ovn-northd-ddlog code for jsonrpc session usage.
>   - Fix newline issues in tests reported by Dumitru.
>   - Add ack from Dumitru.

Thanks Ben for sending out v7.

I have few comments w.r.t to scaling.

1. In the last OVN weekly irc meeting, I had mentioned about
ovn-northd-ddlog taking a lot of time in the loop. I also shared the
scale test results with ddlog
(https://imgur.com/JJpsMhv)  and without ddlog (https://imgur.com/gmbhfoa).

I was able to come up with a dirty script which you can run locally.
This script creates OVN resources
250 times. As the scale increases you will notice the warning messages
in the ovn-northd-ddlog log file

***
timeval|WARN|Unreasonably long 1160ms poll interval (8ms user, 0ms system)
***

As the test progresses the time reported in the warning also increases
gradually and it reaches around 3500ms
in my setup.

I do not observe such warning messages with the c version of northd.

Can you please test it out locally with this script -
https://gist.github.com/numansiddique/1adf22cef57f6b125981b3581085694d

2. ovn-northd-ddlog is missing support for connecting to a raft cluster.

Thanks
Numan



Thanks
Numan







>
> Ben Pfaff (3):
>   tests: Prepare for multiple northd types.
>   tests: Eliminate most "sleep" calls.
>   tests: Improve debuggability of tests.
>
> Leonid Ryzhyk (2):
>   Export `VLOG_WARN` and `VLOG_ERR` from libovn for use in ddlog
>   ovn-northd-ddlog: New implementation of ovn-northd based on ddlog.
>
>  Documentation/automake.mk                     |    2 +
>  Documentation/intro/install/general.rst       |   31 +-
>  Documentation/topics/debugging-ddlog.rst      |  280 +
>  Documentation/topics/index.rst                |    1 +
>  Documentation/tutorials/ddlog-new-feature.rst |  362 +
>  Documentation/tutorials/index.rst             |    1 +
>  NEWS                                          |    6 +
>  TODO.rst                                      |    6 +
>  acinclude.m4                                  |   43 +
>  configure.ac                                  |    5 +
>  lib/ovn-util.c                                |   15 +
>  lib/ovn-util.h                                |    5 +
>  m4/ovn.m4                                     |   16 +
>  northd/.gitignore                             |    4 +
>  northd/automake.mk                            |  104 +
>  northd/helpers.dl                             |   89 +
>  northd/ipam.dl                                |  506 ++
>  northd/lrouter.dl                             |  715 ++
>  northd/lswitch.dl                             |  643 ++
>  northd/multicast.dl                           |  259 +
>  northd/ovn-nb.dlopts                          |   13 +
>  northd/ovn-northd-ddlog.c                     | 1749 ++++
>  northd/ovn-sb.dlopts                          |   28 +
>  northd/ovn.dl                                 |  384 +
>  northd/ovn.rs                                 |  857 ++
>  northd/ovn.toml                               |    2 +
>  northd/ovn_northd.dl                          | 7483 +++++++++++++++++
>  northd/ovsdb2ddlog2c                          |  127 +
>  tests/atlocal.in                              |    7 +
>  tests/ovn-controller-vtep.at                  |    6 +-
>  tests/ovn-ic.at                               |   11 +-
>  tests/ovn-macros.at                           |  114 +-
>  tests/ovn-northd.at                           |  387 +-
>  tests/ovn.at                                  |  887 +-
>  tests/ovs-macros.at                           |   43 +-
>  tests/system-ovn.at                           |  122 +-
>  tutorial/ovs-sandbox                          |   24 +-
>  utilities/checkpatch.py                       |    2 +-
>  utilities/ovn-ctl                             |   20 +-
>  39 files changed, 14791 insertions(+), 568 deletions(-)
>  create mode 100644 Documentation/topics/debugging-ddlog.rst
>  create mode 100644 Documentation/tutorials/ddlog-new-feature.rst
>  create mode 100644 northd/helpers.dl
>  create mode 100644 northd/ipam.dl
>  create mode 100644 northd/lrouter.dl
>  create mode 100644 northd/lswitch.dl
>  create mode 100644 northd/multicast.dl
>  create mode 100644 northd/ovn-nb.dlopts
>  create mode 100644 northd/ovn-northd-ddlog.c
>  create mode 100644 northd/ovn-sb.dlopts
>  create mode 100644 northd/ovn.dl
>  create mode 100644 northd/ovn.rs
>  create mode 100644 northd/ovn.toml
>  create mode 100644 northd/ovn_northd.dl
>  create mode 100755 northd/ovsdb2ddlog2c
>
> --
> 2.26.2
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
Ben Pfaff Nov. 26, 2020, 5:46 a.m. UTC | #2
On Thu, Nov 19, 2020 at 12:53:45PM +0530, Numan Siddique wrote:
> I have few comments w.r.t to scaling.
> 
> 1. In the last OVN weekly irc meeting, I had mentioned about
> ovn-northd-ddlog taking a lot of time in the loop. I also shared the
> scale test results with ddlog
> (https://imgur.com/JJpsMhv)  and without ddlog (https://imgur.com/gmbhfoa).
> 
> I was able to come up with a dirty script which you can run locally.
> This script creates OVN resources
> 250 times. As the scale increases you will notice the warning messages
> in the ovn-northd-ddlog log file
> 
> ***
> timeval|WARN|Unreasonably long 1160ms poll interval (8ms user, 0ms system)
> ***
> 
> As the test progresses the time reported in the warning also increases
> gradually and it reaches around 3500ms
> in my setup.
> 
> I do not observe such warning messages with the c version of northd.
> 
> Can you please test it out locally with this script -
> https://gist.github.com/numansiddique/1adf22cef57f6b125981b3581085694d

Thank you so much for the script.  I didn't manage to work it in for v8,
because it was so much work rewriting the whole database access layer
and cross-porting all the changes in the meantime, but I will work it
in and figure out what's going on for v9.

> 2. ovn-northd-ddlog is missing support for connecting to a raft cluster.

This should be fixed in v8.
Ben Pfaff March 2, 2021, 12:31 a.m. UTC | #3
On Thu, Nov 19, 2020 at 12:53:45PM +0530, Numan Siddique wrote:
> On Thu, Nov 19, 2020 at 10:43 AM Ben Pfaff <blp@ovn.org> wrote:
> 1. In the last OVN weekly irc meeting, I had mentioned about
> ovn-northd-ddlog taking a lot of time in the loop. I also shared the
> scale test results with ddlog
> (https://imgur.com/JJpsMhv)  and without ddlog (https://imgur.com/gmbhfoa).

[...]

> Can you please test it out locally with this script -
> https://gist.github.com/numansiddique/1adf22cef57f6b125981b3581085694d

I'm starting to work on performance testing this week.  Thanks so much
for the script!  I'm just starting to play with it.  It's great to have
something to test against.

> 2. ovn-northd-ddlog is missing support for connecting to a raft cluster.

I think that this should be resolved in the version that was committed
to master, because it's built on the ovsdb-cs library that should
implement all the Raft logic itself.