Message ID | 1598988004-2216-1-git-send-email-dceara@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] ovn-northd: Rate limit missing chassis log. | expand |
On Tue, Sep 1, 2020 at 12:20 PM Dumitru Ceara <dceara@redhat.com> wrote: > > 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> > --- > 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 > Thanks Dumitru, I applied it to master. Han
On 9/1/20 11:26 PM, Han Zhou wrote: > > On Tue, Sep 1, 2020 at 12:20 PM Dumitru Ceara <dceara@redhat.com > <mailto:dceara@redhat.com>> wrote: >> >> 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 <mailto:hzhou@ovn.org>> >> Fixes: 4adc10f58127 ("Avoid nb_cfg update notification flooding") >> Signed-off-by: Dumitru Ceara <dceara@redhat.com > <mailto:dceara@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 >> > > Thanks Dumitru, I applied it to master. > Han Thanks!
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) {
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> --- northd/ovn-northd.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)