From 4fe045290891859c14e19d6bb00b2c857a0d4021 Mon Sep 17 00:00:00 2001
From: Dumitru Ceara <dceara@redhat.com>
Date: Tue, 1 Sep 2020 21:20:04 +0200
Subject: [PATCH] ovn-northd: Rate limit missing chassis log.
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@ovn.org>
Fixes: 4adc10f58127 ("Avoid nb_cfg update notification flooding")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Han Zhou <hzhou@ovn.org>
(cherry picked from upstream commit 81e88122985caf35b6c60b8d04e16cd0b53aa2b7)
Change-Id: I946b74b44149cefec09cd1a19de3ffb8d7c01647
---
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 c83f9d5..8f2cd43 100644
--- a/northd/ovn-northd.c
+++ b/northd/ovn-northd.c
@@ -12254,8 +12254,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