diff mbox series

[ovs-dev] ovn-nbctl: Fix ovn-nbctl --print-wait-time.

Message ID 20210709192349.1016472-1-hzhou@ovn.org
State Accepted
Headers show
Series [ovs-dev] ovn-nbctl: Fix ovn-nbctl --print-wait-time. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success

Commit Message

Han Zhou July 9, 2021, 7:23 p.m. UTC
Recently ovn-nbctl was changed to partially monitor NB DB, which
revealed the missing column monitoring for NB_Global:nb_cfg_timestamp.

Without the fix, ovn-nbctl --wait=hv --print-wait-time would print
something like:

Time spent on processing nb_cfg 39:
	ovn-northd delay before processing:	-1623916000627ms
	ovn-northd completion:			14408ms
	ovn-controller(s) completion:		36204ms

Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 utilities/ovn-nbctl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff July 9, 2021, 8:58 p.m. UTC | #1
On Fri, Jul 09, 2021 at 12:23:49PM -0700, Han Zhou wrote:
> Recently ovn-nbctl was changed to partially monitor NB DB, which
> revealed the missing column monitoring for NB_Global:nb_cfg_timestamp.
> 
> Without the fix, ovn-nbctl --wait=hv --print-wait-time would print
> something like:
> 
> Time spent on processing nb_cfg 39:
> 	ovn-northd delay before processing:	-1623916000627ms
> 	ovn-northd completion:			14408ms
> 	ovn-controller(s) completion:		36204ms
> 
> Signed-off-by: Han Zhou <hzhou@ovn.org>

Acked-by: Ben Pfaff <blp@ovn.org>
Han Zhou July 9, 2021, 11:20 p.m. UTC | #2
On Fri, Jul 9, 2021 at 1:58 PM Ben Pfaff <blp@ovn.org> wrote:
>
> On Fri, Jul 09, 2021 at 12:23:49PM -0700, Han Zhou wrote:
> > Recently ovn-nbctl was changed to partially monitor NB DB, which
> > revealed the missing column monitoring for NB_Global:nb_cfg_timestamp.
> >
> > Without the fix, ovn-nbctl --wait=hv --print-wait-time would print
> > something like:
> >
> > Time spent on processing nb_cfg 39:
> >       ovn-northd delay before processing:     -1623916000627ms
> >       ovn-northd completion:                  14408ms
> >       ovn-controller(s) completion:           36204ms
> >
> > Signed-off-by: Han Zhou <hzhou@ovn.org>
>
> Acked-by: Ben Pfaff <blp@ovn.org>

Thanks Ben. I applied to master branch.
diff mbox series

Patch

diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index ec6d48c75..3144fba49 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -61,6 +61,7 @@  nbctl_add_base_prerequisites(struct ovsdb_idl *idl,
 
     ovsdb_idl_add_table(idl, &nbrec_table_nb_global);
     if (wait_type != NBCTL_WAIT_NONE) {
+        ovsdb_idl_add_column(idl, &nbrec_nb_global_col_nb_cfg_timestamp);
         ovsdb_idl_add_column(idl, &nbrec_nb_global_col_sb_cfg);
         ovsdb_idl_add_column(idl, &nbrec_nb_global_col_sb_cfg_timestamp);
         if (wait_type == NBCTL_WAIT_HV) {