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

Dumitru Ceara dceara at redhat.com
Wed Sep 2 08:45:19 UTC 2020


On 9/1/20 11:26 PM, Han Zhou wrote:
> 
> On Tue, Sep 1, 2020 at 12:20 PM Dumitru Ceara <dceara at redhat.com
> <mailto:dceara at 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 at ovn.org <mailto:hzhou at ovn.org>>
>> Fixes: 4adc10f58127 ("Avoid nb_cfg update notification flooding")
>> Signed-off-by: Dumitru Ceara <dceara at redhat.com
> <mailto: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
>>
> 
> Thanks Dumitru, I applied it to master.
> Han

Thanks!



More information about the dev mailing list