On 9 Dec 2024, at 21:21, Ilya Maximets wrote:

> If prefixes are set for the flow table, ovs-vswitchd will print them
> out to the log whenever something changes in the database.  Since
> normally prefixes will be set for every OpenFlow table, it will print
> 255 log messages per iteration.  This is very annoying in dynamic
> environments like Kubernetes, where database changes can happen
> frequently, obscuring and erasing useful logs on log rotation.
>
> These log messages are not very important.  The information can be
> looked up in the database and normally the values will not actually
> change after initial setup.  Move the log to debug level.
>
> While at it, rate limit the warnings about misconfigured prefixes,
> as they may be too much as well.  And make the print out a little
> nicer by only printing once if multiple adjacent tables have the
> same prefixes configured.  In most cases that will reduce the amount
> of logs from 255 lines to 1 per iteration with debug logging enabled.
> We're also now logging the default values as well, since it's under
> debug and will not actually add that many log lines with the new
> collapsed format.  This makes debug logs more accurate/useful.
>
> An additional improvement might be to not print if nothing actually
> changed, but that will require either per-table per-bridge tracking
> of previous values or changing parts of the ofproto API to tell the
> bridge layer if something changed or not.  Doesn't seem necessary
> at the moment.
>
> Fixes: 13751fd88c4b ("Classifier: Track address prefixes.")
> Signed-off-by: Ilya Maximets <[email protected]>

Do not like the additional log outside the loop with “if (prev_prefixes) {“, 
but I see not other clean(er) solution. The rest looks good to me.

Acked-by: Eelco Chaudron <[email protected]>

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to