Re: [ovs-dev] [PATCH] AUTHORS: Update email address for Jakub Sitnicki.

2018-08-03 Thread Jakub Sitnicki
On Thu, 2 Aug 2018 13:00:38 -0700 Ben Pfaff wrote: > On Thu, Aug 02, 2018 at 11:48:26AM -0400, Aaron Conole wrote: > > Jakub Sitnicki writes: > > > > > Signed-off-by: Jakub Sitnicki > > > --- > > > > > > The j...@red

Re: [ovs-dev] [PATCH v6] ovn: Allow for automatic dynamic updates of IPAM

2018-08-02 Thread Jakub Sitnicki
change contains new tests that ensure that dynamic addresses are > updated when appropriate. > > This patch also alters some existing IPAM tests. Those tests assumed > that dynamic addresses would not be updated automatically, so those > tests either had to be altered or removed. &

[ovs-dev] [PATCH] AUTHORS: Update email address for Jakub Sitnicki.

2018-08-02 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- The j...@redhat.com address will be valid only until August 4th. AUTHORS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.rst b/AUTHORS.rst index 25ee39d75..f3ac8e32b 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -161,7 +161,7

Re: [ovs-dev] [PATCH v2 3/3] ovn-northd: Propagate dynamic addresses to port group address sets.

2018-08-01 Thread Jakub Sitnicki
Hi Simon, On Wed, 1 Aug 2018 11:23:30 +0200 Simon Horman wrote: > Hi Jakub, > > On Mon, Jul 30, 2018 at 04:37:49PM +0200, Jakub Sitnicki wrote: > > If a logical switch port belongs to a port group and has dynamic > > addresses assigned, propagate the addresses to the auto-

Re: [ovs-dev] [PATCH] ovn: Fix typos in "ovn -- Address Set generation..." test.

2018-08-01 Thread Jakub Sitnicki
On Tue, 31 Jul 2018 12:45:41 -0700 Ben Pfaff wrote: > These caused the test to fail. > > CC: Jakub Sitnicki > Fixes: 984c7d5ea8fe ("ovn-northd: Propagate dynamic addresses to port group > address sets.") > Signed-off-by: Ben Pfaff > --- > tests/ov

Re: [ovs-dev] [PATCH v4] Introduce ovs-appctl command to monitor HVs sb connection status

2018-08-01 Thread Jakub Sitnicki
b_idl_is_connected routine > Changes since v1: > - add unit tests for ovs-appctl -t ovn-controller connection-status > command > - use jsonrpc_session_is_connected() in ovsdb_idl_is_connected routine > --- Thanks for the fix-ups. Acked-by: Jakub Sitnicki _

Re: [ovs-dev] [PATCH v3] Introduce ovs-appctl command to monitor HVs sb connection status

2018-07-31 Thread Jakub Sitnicki
On Tue, 31 Jul 2018 15:22:38 +0200 Lorenzo Bianconi wrote: > Add 'connection-status' command to ovs-appctl utility in order to check > if a given chassis is currently connected to SB db > > Acked-by: Mark Michelson > Co-authored-by: aginwala > Signed-off-by: aginwala > Signed-off-by: Lorenzo

Re: [ovs-dev] [PATCH v2] Introduce ovs-appctl command to monitor HVs sb connection status

2018-07-31 Thread Jakub Sitnicki
On Mon, 30 Jul 2018 17:10:23 +0200 Lorenzo Bianconi wrote: > Add 'connection-status' command to ovs-appctl utility in order to check > if a given chassis is currently connected to SB db > > Co-authored-by: aginwala > Signed-off-by: aginwala > Signed-off-by: Lorenzo Bianconi > --- > Changes

Re: [ovs-dev] [PATCH v2 2/2] ovn: Modify restart_controller in ovn-ctl to use --restart

2018-07-31 Thread Jakub Sitnicki
On Mon, 30 Jul 2018 09:47:45 -0400 Mark Michelson wrote: > The --restart flag allows for uninterrupted packet flowage when exiting > ovn-controller. This patch modifies the restart_controller argument to > ovn-ctl to use --restart. > > Signed-off-by: Mark Michelson > --- >

Re: [ovs-dev] [PATCH 3/3] ovn-northd: Propagate dynamic addresses to port group address sets.

2018-07-30 Thread Jakub Sitnicki
On Sat, 28 Jul 2018 23:54:32 -0700 Han Zhou wrote: > On Thu, Jul 26, 2018 at 3:51 AM, Jakub Sitnicki wrote: > > > > If a logical switch port belongs to a port group and has dynamic > > addresses assigned, propagate the addresses to the auto-generated > > addr

[ovs-dev] [PATCH v2 2/3] ovn-northd: Make use of svec for storing lists of addresses.

2018-07-30 Thread Jakub Sitnicki
Get rid of what is, esentially, an open-coded version of svec. Signed-off-by: Jakub Sitnicki Acked-by: Han Zhou --- ovn/northd/ovn-northd.c | 47 +++--- tests/ovn.at| 50 + 2 files changed, 65

[ovs-dev] [PATCH v2 3/3] ovn-northd: Propagate dynamic addresses to port group address sets.

2018-07-30 Thread Jakub Sitnicki
If a logical switch port belongs to a port group and has dynamic addresses assigned, propagate the addresses to the auto-generated address sets for the port group. Signed-off-by: Jakub Sitnicki Acked-by: Han Zhou --- ovn/northd/ovn-northd.c | 34 tests/ovn.at

[ovs-dev] [PATCH v2 1/3] ovn-nbctl: Allow referring to port groups by name.

2018-07-30 Thread Jakub Sitnicki
Be user-friendly and allow using port group's name as its identifier in database commands. Signed-off-by: Jakub Sitnicki Acked-by: Han Zhou --- ovn/utilities/ovn-nbctl.c | 3 +++ tests/ovn-nbctl.at| 14 ++ 2 files changed, 17 insertions(+) diff --git a/ovn/utilities/ovn

[ovs-dev] [PATCH v2 0/3] Port Group fixes

2018-07-30 Thread Jakub Sitnicki
://patchwork.ozlabs.org/patch/947155/ v1 -> v2: - Check if LSP addresses are static before treating them as such to avoid a warning. Reported by Han Zhou. Jakub Sitnicki (3): ovn-nbctl: Allow referring to port groups by name. ovn-northd: Make use of svec for storing lists of addresses. ovn-nor

Re: [ovs-dev] [PATCH 0/2] Allow for smoother restarting of ovn-controller

2018-07-30 Thread Jakub Sitnicki
| 2 +- > 4 files changed, 241 insertions(+), 43 deletions(-) > I had one minor comment. Otherwise LGTM: Acked-by: Jakub Sitnicki ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Re: [ovs-dev] [PATCH 2/2] ovn: Modify restart_controller in ovn-ctl to use --restart

2018-07-30 Thread Jakub Sitnicki
On Tue, 24 Jul 2018 16:30:06 -0400 Mark Michelson wrote: > The --restart flag allows for uninterrupted packet flowage when exiting > ovn-controller. This patch modifies the restart_controller argument to > ovn-ctl to use --restart. > > Signed-off-by: Mark Michelson > --- >

[ovs-dev] [PATCH 2/3] ovn-northd: Make use of svec for storing lists of addresses.

2018-07-26 Thread Jakub Sitnicki
Get rid of what is, esentially, an open-coded version of svec. Signed-off-by: Jakub Sitnicki --- ovn/northd/ovn-northd.c | 47 +++--- tests/ovn.at| 50 + 2 files changed, 65 insertions(+), 32

[ovs-dev] [PATCH 3/3] ovn-northd: Propagate dynamic addresses to port group address sets.

2018-07-26 Thread Jakub Sitnicki
If a logical switch port belongs to a port group and has dynamic addresses assigned, propagate the addresses to the auto-generated address sets for the port group. Signed-off-by: Jakub Sitnicki --- ovn/northd/ovn-northd.c | 34 +++- tests/ovn.at| 59

[ovs-dev] [PATCH 1/3] ovn-nbctl: Allow referring to port groups by name.

2018-07-26 Thread Jakub Sitnicki
Be user-friendly and allow using port group's name as its identifier in database commands. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 3 +++ tests/ovn-nbctl.at| 14 ++ 2 files changed, 17 insertions(+) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn

[ovs-dev] [PATCH 0/3] Port Group fixes

2018-07-26 Thread Jakub Sitnicki
://patchwork.ozlabs.org/patch/947155/ Jakub Sitnicki (3): ovn-nbctl: Allow referring to port groups by name. ovn-northd: Make use of svec for storing lists of addresses. ovn-northd: Propagate dynamic addresses to port group address sets. ovn/northd/ovn-northd.c | 77

Re: [ovs-dev] [PATCH 1/1] ovn-nbctl: Initialize arguments to avoid compilation warnings.

2018-07-26 Thread Jakub Sitnicki
function > anyhow. > > Cc: Jakub Sitnicki > Fixes: 3844c85de979 ("ovn-nbctl: Don't die in dhcp_options_get()." > Fixes: bc8223df3b01 ("ovn-nbctl: Don't die in parse_priority().") > Signed-off-by: Ian Stokes > --- Thank you for fixing it up. Acked-by: Jak

Re: [ovs-dev] [PATCH 4/4] [RFC] ovn-nbctl: Make daemon mode more transparent.

2018-07-25 Thread Jakub Sitnicki
On Tue, Jul 24, 2018 at 07:53 PM GMT, Ben Pfaff wrote: > This has some flaws in the details; for example, command-line options > parsing is very inflexible. > > Signed-off-by: Ben Pfaff > --- Thank you for working on this. I hooked it up to ovn-nbct.at test suite and it worked quite nicely. Only

[ovs-dev] [PATCH] ovn-nbctl: Detect unrecognized short options in server mode.

2018-07-25 Thread Jakub Sitnicki
to 0 instead of 1 as pointed out in NOTES in getopt(3) man-page. Not doing so results in invalid reads and optopt being set to a garbarge value. Fixes: 3ec06ea9c668 ("ovn-nbctl: Initial support for daemon mode.") Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nb

[ovs-dev] [PATCH] NEWS: Mention daemon mode support for ovn-nbctl.

2018-07-24 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- NEWS | 4 1 file changed, 4 insertions(+) diff --git a/NEWS b/NEWS index 057e8bfd3..2414b9199 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,10 @@ Post-v2.9.0 * ACL match conditions can now match on Port_Groups as well as address sets

Re: [ovs-dev] [PATCH v5 00/21] Daemon mode for ovn-nbctl

2018-07-24 Thread Jakub Sitnicki
On Mon, 23 Jul 2018 16:47:52 -0700 Ben Pfaff wrote: > On Thu, Jul 19, 2018 at 03:51:05PM +0200, Jakub Sitnicki wrote: > > This series extends ovn-nbctl tool with support for the daemon mode, where > > ovn-nbctl acts a long-lived process that accepts commands over a U

Re: [ovs-dev] [PATCH 10/11] ovn-nbctl: Remove pointless "return; " at ends of functions.

2018-07-24 Thread Jakub Sitnicki
On Mon, 23 Jul 2018 15:38:55 -0700 Ben Pfaff wrote: > On Tue, Jul 17, 2018 at 03:34:14PM +0200, Jakub Sitnicki wrote: > > Fix fall-out from applying a semantic patch that converts ctl_fatal() > > calls to use ctl_error(). > > > > Signed-off-by: Jakub Sitnicki >

Re: [ovs-dev] [PATCH 08/11] ovn-nbctl: Propagate error thru the context.

2018-07-24 Thread Jakub Sitnicki
On Mon, 23 Jul 2018 15:36:28 -0700 Ben Pfaff wrote: > On Tue, Jul 17, 2018 at 03:34:12PM +0200, Jakub Sitnicki wrote: > > Instead of dying let the main loop handle the error. > > This will allow us to report errors when running in daemon mode. > > > > This is a resul

Re: [ovs-dev] [PATCH 06/11] ovn-nbctl: Don't die in parse_direction().

2018-07-24 Thread Jakub Sitnicki
On Mon, 23 Jul 2018 15:33:26 -0700 Ben Pfaff wrote: > On Tue, Jul 17, 2018 at 03:34:10PM +0200, Jakub Sitnicki wrote: > > Let the caller handle the error. This prepares us for reporting errors > > in daemon mode. > > > > Signed-off-by: Jakub Sitnicki &g

Re: [ovs-dev] [PATCH v4] ovn: Allow for automatic dynamic updates of IPAM

2018-07-20 Thread Jakub Sitnicki
ns new tests that ensure that dynamic addresses are > updated when appropriate. > > This patch also alters some existing IPAM tests. Those tests assumed > that dynamic addresses would not be updated automatically, so those > tests either had to be altered or removed. > > Signed

Re: [ovs-dev] [PATCH v5 00/21] Daemon mode for ovn-nbctl

2018-07-19 Thread Jakub Sitnicki
Thanks for starting the discussion, Mark. On Thu, 19 Jul 2018 12:26:24 -0400 Mark Michelson wrote: > On 07/19/2018 09:51 AM, Jakub Sitnicki wrote: (...) > > The changes are functional to the point that all test cases in the ovn-nbctl > > test suite (tests/ovn-nbctl.at) and

[ovs-dev] [PATCH 00/11] Get rid of ctl_fatal() calls in ovn-nbctl (part 2)

2018-07-19 Thread Jakub Sitnicki
in review [1]), or as a follow-up to it. Thanks, Jakub [1] https://patchwork.ozlabs.org/project/openvswitch/list/?series=55472 Jakub Sitnicki (11): ovn-nbctl: Don't die in pg_by_name_or_uuid(). ovn-nbctl: Don't die in gc_by_name_or_uuid(). ovn-nbctl: Don't die in lsp_to_ls(). ovn-nbctl

[ovs-dev] [PATCH v5 21/21] tests: Add test for ovn-nbctl's command parser error paths.

2018-07-19 Thread Jakub Sitnicki
Preparatory work for getting rid of ctl_fatal() in command parser. Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 76 ++ 1 file changed, 76 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 4e6986a5e..ffbd2a140

[ovs-dev] [PATCH v5 20/21] tests: Add test for oneline-formatted output for ovn-nbctl.

2018-07-19 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 585967568..4e6986a5e 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1403,3 +1403,24 @@ AT_CHECK([ovn-nbctl

[ovs-dev] [PATCH v5 19/21] tests: Add test for ovn-nbctl dry run mode.

2018-07-19 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 73a61a4be..585967568 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1382,3 +1382,24 @@ inactivity_probe

[ovs-dev] [PATCH v5 18/21] ovn-nbctl: Initial support for daemon mode.

2018-07-19 Thread Jakub Sitnicki
() will result in death of the daemon process. However, --monitor option can be used to keep the daemon running. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.8.xml | 40 + ovn/utilities/ovn-nbctl.c | 335 ++ 2 files changed, 344 insertions(+), 31

[ovs-dev] [PATCH v5 17/21] ovn-nbctl: Extract a helper for appending command options.

2018-07-19 Thread Jakub Sitnicki
Will be reused when parsing options in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 490577238

[ovs-dev] [PATCH v5 16/21] ovn-nbctl: Extract a helper for building short options string.

2018-07-19 Thread Jakub Sitnicki
Will be reused for parsing options in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index ca0f71300..490577238 100644

[ovs-dev] [PATCH v5 15/21] ovn-nbctl: Extract handling of options that affect main loop.

2018-07-19 Thread Jakub Sitnicki
Provide a handler for options that change how the main loop behaves. This will allow code reuse for option parsing in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 136 -- 1 file changed, 84 insertions(+), 52 deletions

[ovs-dev] [PATCH v5 14/21] ovn-nbctl: Extract helper for printing oneline output.

2018-07-19 Thread Jakub Sitnicki
This will allow us to direct oneline-formatted output to other sinks than stdout if needed. Preparatory work for daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 53 ++- 1 file changed, 34 insertions(+), 19 deletions(-) diff

[ovs-dev] [PATCH v5 13/21] ovn-nbctl: Introduce a poll_timer based wait timeout.

2018-07-19 Thread Jakub Sitnicki
Extend the main loop and the command runner so that the caller can specify a timeout for poll_block(). This will allow us to break out of the main loop when waiting on IDL, like in the blocked '--wait=sb/hv sync' case. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 27

[ovs-dev] [PATCH v5 12/21] ovn-nbctl: Propagate errors from prerequisites runner.

2018-07-19 Thread Jakub Sitnicki
Instead of terminating the process, return the error to the caller. This will allow us to reuse the prerequisites runner in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/ovn

[ovs-dev] [PATCH v5 11/21] ovn-nbctl: Propagate errors from the main loop.

2018-07-19 Thread Jakub Sitnicki
Let the caller handle the errors instead of reporting it and terminating. Prepare for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn

[ovs-dev] [PATCH v5 10/21] ovn-nbctl: Propagate the error from do_nbctl().

2018-07-19 Thread Jakub Sitnicki
Instead of terminating the process, return the error to the caller. This will allow us to reuse the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 46 -- 1 file changed, 32 insertions(+), 14 deletions(-) diff

[ovs-dev] [PATCH v5 09/21] db-ctl-base: Propagate errors from the commands parser.

2018-07-19 Thread Jakub Sitnicki
Let the caller decide how to handle the error. Prepare for using the parser in ovn-nbctl daemon mode. Signed-off-by: Jakub Sitnicki --- lib/db-ctl-base.c | 30 +- lib/db-ctl-base.h | 6 +++--- ovn/utilities/ovn-nbctl.c | 7 +-- ovn/utilities/ovn

[ovs-dev] [PATCH v5 08/21] db-ctl-base: Propagate error from parse_command().

2018-07-19 Thread Jakub Sitnicki
Let the caller handle the error. Needed for ovn-nbctl daemon mode. Signed-off-by: Jakub Sitnicki --- lib/db-ctl-base.c | 63 +-- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index

[ovs-dev] [PATCH v5 07/21] ovn-nbctl: Don't destroy the transaction twice on error.

2018-07-19 Thread Jakub Sitnicki
Reset the global state, if transaction succeeded. Otherwise nbctl_exit() callback will try to clean up on any fatal error. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index

[ovs-dev] [PATCH v5 06/21] ovn-nbctl: Signal need to try again via an output param.

2018-07-19 Thread Jakub Sitnicki
Introduce an output parameter for the flag that signals need to retry running the command. This leaves the return value for error reporting. Preparatory work for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 +--- 1 file

[ovs-dev] [PATCH v5 05/21] ovn-nbctl: Pull up releasing IDL from do_nbctl().

2018-07-19 Thread Jakub Sitnicki
Destroy IDL resources in the routine where we allocated them. Preparatory work for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities

[ovs-dev] [PATCH v5 03/21] ovn-nbctl: Extract the main loop.

2018-07-19 Thread Jakub Sitnicki
Split out a routine for the main ovn-nbctl loop. Preparatory work for introducing daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn

[ovs-dev] [PATCH v5 01/21] table: Introduce a constant for default table style.

2018-07-19 Thread Jakub Sitnicki
Having a constant in addition to the constant expression for the default table style allows us to reset 'struct table_style' variables to default style. Signed-off-by: Jakub Sitnicki --- lib/table.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/table.h b/lib/table.h index 313ac1dd2

[ovs-dev] [PATCH v5 02/21] ovsdb-idl: Allow monitoring columns that are already monitored.

2018-07-19 Thread Jakub Sitnicki
the IDL has already ran once. Signed-off-by: Jakub Sitnicki --- lib/ovsdb-idl.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 9ab5d6723..ae0a55c3a 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1116,6 +1116,20

[ovs-dev] [PATCH v5 00/21] Daemon mode for ovn-nbctl

2018-07-19 Thread Jakub Sitnicki
tion with tests from the series until a right approach can be found. Integration with tests that was used during development is available at: https://github.com/jsitnicki/ovs/commits/wip-nbctl-daemon-2018-07-11 - Minor style cleanups. Jakub Sitnicki (21): table: Introduce a constant for defau

Re: [ovs-dev] [ovs-dev, v4, 11 of 21] ovn-nbctl: Propagate errors from the main loop.

2018-07-19 Thread Jakub Sitnicki
On Thu, 19 Jul 2018 09:15:14 -0400 0-day Robot wrote: (...) > ovn/utilities/ovn-nbctl.c: In function ‘main’: > ovn/utilities/ovn-nbctl.c:133:11: error: redefinition of ‘error’ > char *error = main_loop(args, commands, n_commands, idl); >^ > ovn/utilities/ovn-nbctl.c:116:11:

[ovs-dev] [PATCH v4 21/21] tests: Add test for ovn-nbctl's command parser error paths.

2018-07-19 Thread Jakub Sitnicki
Preparatory work for getting rid of ctl_fatal() in command parser. Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 76 ++ 1 file changed, 76 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 4e6986a5e..ffbd2a140

[ovs-dev] [PATCH v4 19/21] tests: Add test for ovn-nbctl dry run mode.

2018-07-19 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 73a61a4be..585967568 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1382,3 +1382,24 @@ inactivity_probe

[ovs-dev] [PATCH v4 20/21] tests: Add test for oneline-formatted output for ovn-nbctl.

2018-07-19 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 585967568..4e6986a5e 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1403,3 +1403,24 @@ AT_CHECK([ovn-nbctl

[ovs-dev] [PATCH v4 18/21] ovn-nbctl: Initial support for daemon mode.

2018-07-19 Thread Jakub Sitnicki
() will result in death of the daemon process. However, --monitor option can be used to keep the daemon running. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.8.xml | 40 + ovn/utilities/ovn-nbctl.c | 336 ++ 2 files changed, 344 insertions(+), 32

[ovs-dev] [PATCH v4 17/21] ovn-nbctl: Extract a helper for appending command options.

2018-07-19 Thread Jakub Sitnicki
Will be reused when parsing options in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 339a182e8

[ovs-dev] [PATCH v4 16/21] ovn-nbctl: Extract a helper for building short options string.

2018-07-19 Thread Jakub Sitnicki
Will be reused for parsing options in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index a9113b9e0..339a182e8 100644

[ovs-dev] [PATCH v4 15/21] ovn-nbctl: Extract handling of options that affect main loop.

2018-07-19 Thread Jakub Sitnicki
Provide a handler for options that change how the main loop behaves. This will allow code reuse for option parsing in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 136 -- 1 file changed, 84 insertions(+), 52 deletions

[ovs-dev] [PATCH v4 14/21] ovn-nbctl: Extract helper for printing oneline output.

2018-07-19 Thread Jakub Sitnicki
This will allow us to direct oneline-formatted output to other sinks than stdout if needed. Preparatory work for daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 53 ++- 1 file changed, 34 insertions(+), 19 deletions(-) diff

[ovs-dev] [PATCH v4 12/21] ovn-nbctl: Propagate errors from prerequisites runner.

2018-07-19 Thread Jakub Sitnicki
Instead of terminating the process, return the error to the caller. This will allow us to reuse the prerequisites runner in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git

[ovs-dev] [PATCH v4 13/21] ovn-nbctl: Introduce a poll_timer based wait timeout.

2018-07-19 Thread Jakub Sitnicki
Extend the main loop and the command runner so that the caller can specify a timeout for poll_block(). This will allow us to break out of the main loop when waiting on IDL, like in the blocked '--wait=sb/hv sync' case. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 27

[ovs-dev] [PATCH v4 11/21] ovn-nbctl: Propagate errors from the main loop.

2018-07-19 Thread Jakub Sitnicki
Let the caller handle the errors instead of reporting it and terminating. Prepare for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn

[ovs-dev] [PATCH v4 10/21] ovn-nbctl: Propagate the error from do_nbctl().

2018-07-19 Thread Jakub Sitnicki
Instead of terminating the process, return the error to the caller. This will allow us to reuse the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 46 -- 1 file changed, 32 insertions(+), 14 deletions(-) diff

[ovs-dev] [PATCH v4 09/21] db-ctl-base: Propagate errors from the commands parser.

2018-07-19 Thread Jakub Sitnicki
Let the caller decide how to handle the error. Prepare for using the parser in ovn-nbctl daemon mode. Signed-off-by: Jakub Sitnicki --- lib/db-ctl-base.c | 30 +- lib/db-ctl-base.h | 6 +++--- ovn/utilities/ovn-nbctl.c | 7 +-- ovn/utilities/ovn

[ovs-dev] [PATCH v4 08/21] db-ctl-base: Propagate error from parse_command().

2018-07-19 Thread Jakub Sitnicki
Let the caller handle the error. Needed for ovn-nbctl daemon mode. Signed-off-by: Jakub Sitnicki --- lib/db-ctl-base.c | 63 +-- 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index

[ovs-dev] [PATCH v4 07/21] ovn-nbctl: Don't destroy the transaction twice on error.

2018-07-19 Thread Jakub Sitnicki
If transaction succeeded reset the state. Otherwise nbctl_exit() callback will try to clean up on any fatal error. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index

[ovs-dev] [PATCH v4 06/21] ovn-nbctl: Signal need to try again via an output param.

2018-07-19 Thread Jakub Sitnicki
Introduce an output parameter for the flag that signals need to retry running the command. This leaves the return value for error reporting. Preparatory work for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 +--- 1 file

[ovs-dev] [PATCH v4 03/21] ovn-nbctl: Extract the main loop.

2018-07-19 Thread Jakub Sitnicki
Split out a routine for the main ovn-nbctl loop. Preparatory work for introducing daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn

[ovs-dev] [PATCH v4 04/21] ovn-nbctl: Pull up destroying commands from do_nbctl().

2018-07-19 Thread Jakub Sitnicki
Destroy commands in the same routine where they were allocated. Preparatory work for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b

[ovs-dev] [PATCH v4 02/21] ovsdb-idl: Allow monitoring columns that are already monitored.

2018-07-19 Thread Jakub Sitnicki
the IDL has already ran once. Signed-off-by: Jakub Sitnicki --- lib/ovsdb-idl.c | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/ovsdb-idl.c b/lib/ovsdb-idl.c index 9ab5d6723..ae0a55c3a 100644 --- a/lib/ovsdb-idl.c +++ b/lib/ovsdb-idl.c @@ -1116,6 +1116,20

[ovs-dev] [PATCH v4 01/21] table: Introduce a constant for default table style.

2018-07-19 Thread Jakub Sitnicki
Having a constant in addition to the constant expression for the default table style allows us to reset 'struct table_style' variables to default style. Signed-off-by: Jakub Sitnicki --- lib/table.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/table.h b/lib/table.h index 313ac1dd2

[ovs-dev] [PATCH v4 00/21] Daemon mode for ovn-nbctl

2018-07-19 Thread Jakub Sitnicki
urn at the end of a void function. Pointed out by Ben Pfaff. - Drop WIP patch for integration with tests from the series until a right approach can be found. Integration with tests that was used during development is available at: https://github.com/jsitnicki/ovs/commits/wip-nbctl-daemon-2

Re: [ovs-dev] [PATCH 01/11] ovn-nbctl: Don't die in pg_by_name_or_uuid().

2018-07-17 Thread Jakub Sitnicki
with separately. Either as a part of ovn-nbctl daemon series (already in review [1]), or as a follow-up to it. Thanks, Jakub [1] https://patchwork.ozlabs.org/project/openvswitch/list/?series=55472 Jakub Sitnicki (11): ovn-nbctl: Don't die in pg_by_name_or_uuid(). ovn-nbctl: Don't die

[ovs-dev] [PATCH 11/11] ovn-nbctl: Fix mem leak in nbctl_lrp_set_gateway_chassis().

2018-07-17 Thread Jakub Sitnicki
Fix fall-out from applying a semantic patch to propagate the error. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 27e3151a8..12845a035 100644 --- a/ovn/utilities/ovn

[ovs-dev] [PATCH 10/11] ovn-nbctl: Remove pointless "return; " at ends of functions.

2018-07-17 Thread Jakub Sitnicki
Fix fall-out from applying a semantic patch that converts ctl_fatal() calls to use ctl_error(). Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 8301e74cc..27e3151a8

[ovs-dev] [PATCH 09/11] ovn-nbctl: Use ctl_error() in command handlers.

2018-07-17 Thread Jakub Sitnicki
) { <... - ctl_fatal(S); + ctl_error(C, S); + return; ...> } @@ identifier F, C; expression S, A; @@ static void F(struct ctl_context *C) { <... - ctl_fatal(S, A); + ctl_error(C, S, A); + return; ...> } Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-

[ovs-dev] [PATCH 08/11] ovn-nbctl: Propagate error thru the context.

2018-07-17 Thread Jakub Sitnicki
(E) { - ctl_fatal("%s", E); + C->error = E; + return; } ...> } Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 135 ++ 1 file changed, 90 insertions(+), 45 deletions(-) diff --git a/ovn/utilitie

[ovs-dev] [PATCH 07/11] ovn-nbctl: Don't die in dhcp_options_get().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 44 +++- 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn

[ovs-dev] [PATCH 06/11] ovn-nbctl: Don't die in parse_direction().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn

[ovs-dev] [PATCH 05/11] ovn-nbctl: Don't die in parse_priority().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 44 ++-- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn

[ovs-dev] [PATCH 04/11] ovn-nbctl: Don't die in lrp_to_lr().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c

[ovs-dev] [PATCH 03/11] ovn-nbctl: Don't die in lsp_to_ls().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c

[ovs-dev] [PATCH 02/11] ovn-nbctl: Don't die in gc_by_name_or_uuid().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index

[ovs-dev] [PATCH 01/11] ovn-nbctl: Don't die in pg_by_name_or_uuid().

2018-07-17 Thread Jakub Sitnicki
Let the caller handle the error. This prepares us for reporting errors in daemon mode. Also, extend the tests to cover this error path. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 23 --- tests/ovn-nbctl.at| 5 + 2 files changed, 21 insertions

Re: [ovs-dev] [PATCH v3 00/17] Daemon mode for ovn-nbctl

2018-07-17 Thread Jakub Sitnicki
Hi Mark, On Mon, 16 Jul 2018 14:11:19 -0400 Mark Michelson wrote: > I've had a look through again and this series addresses the findings I > previously had, so in short: > > Acked-by: Mark Michelson > > I decided to do some testing to see what sort of performance gain we see > with this

[ovs-dev] [PATCH v3 17/17] tests: Add test for oneline-formatted output for ovn-nbctl.

2018-07-13 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 89daf631a..60b4d0c9c 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1403,3 +1403,24 @@ AT_CHECK([ovn-nbctl

[ovs-dev] [PATCH v3 16/17] tests: Add test for ovn-nbctl dry run mode.

2018-07-13 Thread Jakub Sitnicki
Signed-off-by: Jakub Sitnicki --- tests/ovn-nbctl.at | 21 + 1 file changed, 21 insertions(+) diff --git a/tests/ovn-nbctl.at b/tests/ovn-nbctl.at index 73a61a4be..89daf631a 100644 --- a/tests/ovn-nbctl.at +++ b/tests/ovn-nbctl.at @@ -1382,3 +1382,24 @@ inactivity_probe

[ovs-dev] [PATCH v3 15/17] ovn-nbctl: Initial support for daemon mode.

2018-07-13 Thread Jakub Sitnicki
() will result in death of the daemon process. However, --monitor option can be used to keep the daemon running. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.8.xml | 40 ++ ovn/utilities/ovn-nbctl.c | 308 ++ 2 files changed, 322 insertions(+), 26

[ovs-dev] [PATCH v3 14/17] ovn-nbctl: Extract a helper for appending command options.

2018-07-13 Thread Jakub Sitnicki
Will be reused when parsing options in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index bac1c001d

[ovs-dev] [PATCH v3 13/17] ovn-nbctl: Extract a helper for building short options string.

2018-07-13 Thread Jakub Sitnicki
Will be reused for parsing options in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities/ovn-nbctl.c index 72c78795c..bac1c001d 100644

[ovs-dev] [PATCH v3 12/17] ovn-nbctl: Extract handling of options that affect main loop.

2018-07-13 Thread Jakub Sitnicki
Provide a handler for options that change how the main loop behaves. This will allow code reuse for option parsing in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 136 -- 1 file changed, 84 insertions(+), 52 deletions

[ovs-dev] [PATCH v3 11/17] ovn-nbctl: Extract helper for printing oneline output.

2018-07-13 Thread Jakub Sitnicki
This will allow us to direct oneline-formatted output to other sinks than stdout if needed. Preparatory work for daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 53 ++- 1 file changed, 34 insertions(+), 19 deletions(-) diff

[ovs-dev] [PATCH v3 10/17] ovn-nbctl: Introduce a poll_timer based wait timeout.

2018-07-13 Thread Jakub Sitnicki
Extend the main loop and the command runner so that the caller can specify a timeout for poll_block(). This will allow us to break out of the main loop when waiting on IDL, like in the blocked '--wait=sb/hv sync' case. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 27

[ovs-dev] [PATCH v3 09/17] ovn-nbctl: Propagate errors from prerequisites runner.

2018-07-13 Thread Jakub Sitnicki
Instead of terminating the process, return the error to the caller. This will allow us to reuse the prerequisites runner in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ovn

[ovs-dev] [PATCH v3 08/17] ovn-nbctl: Propagate errors from the main loop.

2018-07-13 Thread Jakub Sitnicki
Let the caller handle the errors instead of reporting it and terminating. Prepare for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ovn/utilities/ovn

[ovs-dev] [PATCH v3 07/17] ovn-nbctl: Propagate the error from do_nbctl().

2018-07-13 Thread Jakub Sitnicki
Instead of terminating the process, return the error to the caller. This will allow us to reuse the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 46 -- 1 file changed, 32 insertions(+), 14 deletions(-) diff

[ovs-dev] [PATCH v3 06/17] ovn-nbctl: Signal need to try again via an output param.

2018-07-13 Thread Jakub Sitnicki
Introduce an output parameter for the flag that signals need to retry running the command. This leaves the return value for error reporting. Preparatory work for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 20 +--- 1 file

[ovs-dev] [PATCH v3 05/17] ovn-nbctl: Pull up releasing IDL from do_nbctl().

2018-07-13 Thread Jakub Sitnicki
Destroy IDL resources in the routine where we allocated them. Preparatory work for reusing the main loop in daemon mode. Signed-off-by: Jakub Sitnicki --- ovn/utilities/ovn-nbctl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ovn/utilities/ovn-nbctl.c b/ovn/utilities

  1   2   3   >