[ovs-dev] [PATCH ovn] ovn-northd: Rate limit missing chassis log.

Dumitru Ceara dceara at redhat.com
Tue Sep 1 19:20:04 UTC 2020


This log does indicate a problem so it's useful to log it at WARN level
but there's not much use to spam at every iteration of ovn-northd.

CC: Han Zhou <hzhou at ovn.org>
Fixes: 4adc10f58127 ("Avoid nb_cfg update notification flooding")
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
---
 northd/ovn-northd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
index f2e3104..7be0e85 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -12265,8 +12265,10 @@ update_northbound_cfg(struct northd_context *ctx,
                     continue;
                 }
             } else {
-                VLOG_WARN("Chassis not exist for Chassis_Private record, "
-                          "name: %s", chassis_priv->name);
+                static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 1);
+                VLOG_WARN_RL(&rl, "Chassis does not exist for "
+                             "Chassis_Private record, name: %s",
+                             chassis_priv->name);
             }
 
             if (chassis_priv->nb_cfg < hv_cfg) {
-- 
1.8.3.1



More information about the dev mailing list