On Sun, Jul 5, 2020 at 11:08 AM Ankur Sharma <svc.mail....@nutanix.com>
wrote:

> From: Ankur Sharma <ankur.sha...@nutanix.com>
>
> ISSUE:
> We observed that if ovn-controller is running, while ovn-encap-ip/
> ovn-encap-type is not set, then following error gets logged
> continously:
> "chassis|INFO|Need to specify an encap type and ip"
>
> Above log increased the size of ovn-controller.log to hundreds
> of GBs  before logger.d could kick in (frequency is 24 hours)
> and rotate the log file.
>
> This Patch rate limits (rate_limit=1, burst_size=5) INFO logs
> for following errors:
> a. ovn-encap-ip/ovn-encap-type not set.
> b. ovn-encap-type set to invalid value.
>
> Signed-off-by: Ankur Sharma <ankur.sha...@nutanix.com>
>

Thanks Ankur.

I applied this patch to master.

Numan


> ---
>  controller/chassis.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/controller/chassis.c b/controller/chassis.c
> index aa3fed0..eec270e 100644
> --- a/controller/chassis.c
> +++ b/controller/chassis.c
> @@ -214,7 +214,8 @@ chassis_parse_ovs_encap_type(const char *encap_type,
>
>      SSET_FOR_EACH (type, encap_type_set) {
>          if (!get_tunnel_type(type)) {
> -            VLOG_INFO("Unknown tunnel type: %s", type);
> +            static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
> +            VLOG_INFO_RL(&rl, "Unknown tunnel type: %s", type);
>          }
>      }
>
> @@ -266,7 +267,8 @@ chassis_parse_ovs_config(const struct
> ovsrec_open_vswitch_table *ovs_table,
>      const char *encap_type = smap_get(&cfg->external_ids,
> "ovn-encap-type");
>      const char *encap_ips = smap_get(&cfg->external_ids, "ovn-encap-ip");
>      if (!encap_type || !encap_ips) {
> -        VLOG_INFO("Need to specify an encap type and ip");
> +        static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
> +        VLOG_INFO_RL(&rl, "Need to specify an encap type and ip");
>          return false;
>      }
>
> --
> 2.7.4
>
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to