From patchwork Fri Jul 9 19:23:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Han Zhou X-Patchwork-Id: 1503345 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=smtp4.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GM34S5N0Mz9sPf for ; Sat, 10 Jul 2021 05:24:08 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 9D021404F0; Fri, 9 Jul 2021 19:24:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uWbVmVyFcTZt; Fri, 9 Jul 2021 19:24:03 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTPS id F2CCC40447; Fri, 9 Jul 2021 19:24:01 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id ADB48C001A; Fri, 9 Jul 2021 19:24:01 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 482CCC000E for ; Fri, 9 Jul 2021 19:24:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 2595E83CF0 for ; Fri, 9 Jul 2021 19:24:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 56sEXwHAazC0 for ; Fri, 9 Jul 2021 19:23:59 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) by smtp1.osuosl.org (Postfix) with ESMTPS id CA625839A4 for ; Fri, 9 Jul 2021 19:23:58 +0000 (UTC) Received: (Authenticated sender: hzhou@ovn.org) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 9ACA7200006; Fri, 9 Jul 2021 19:23:55 +0000 (UTC) From: Han Zhou To: dev@openvswitch.org Date: Fri, 9 Jul 2021 12:23:49 -0700 Message-Id: <20210709192349.1016472-1-hzhou@ovn.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH ovn] ovn-nbctl: Fix ovn-nbctl --print-wait-time. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" 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 Acked-by: Ben Pfaff --- utilities/ovn-nbctl.c | 1 + 1 file changed, 1 insertion(+) 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) {