diff mbox

[ovs-dev,V2] dpif-netlink: Fix log level for error message

Message ID 1501390697-3427-1-git-send-email-roid@mellanox.com
State Accepted
Headers show

Commit Message

Roi Dayan July 30, 2017, 4:58 a.m. UTC
Since it's an error but also will always occur in older kernels
log the message with level warning instead of info.

Signed-off-by: Roi Dayan <roid@mellanox.com>
---
 lib/dpif-netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Garver July 31, 2017, 1:43 p.m. UTC | #1
On Sun, Jul 30, 2017 at 07:58:17AM +0300, Roi Dayan wrote:
> Since it's an error but also will always occur in older kernels
> log the message with level warning instead of info.
> 
> Signed-off-by: Roi Dayan <roid@mellanox.com>
> ---
>  lib/dpif-netlink.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
> index 55effd1..118576c 100644
> --- a/lib/dpif-netlink.c
> +++ b/lib/dpif-netlink.c
> @@ -972,7 +972,7 @@ dpif_netlink_rtnl_port_create_and_add(struct dpif_netlink *dpif,
>      error = dpif_netlink_rtnl_port_create(netdev);
>      if (error) {
>          if (error != EOPNOTSUPP) {
> -            VLOG_INFO_RL(&rl, "Failed to create %s with rtnetlink: %s",
> +            VLOG_WARN_RL(&rl, "Failed to create %s with rtnetlink: %s",
>                           netdev_get_name(netdev), ovs_strerror(error));
>          }
>          return error;
> -- 
> 2.7.4
> 

Acked-by: Eric Garver <e@erig.me>
Joe Stringer Aug. 1, 2017, 8:56 p.m. UTC | #2
On 29 July 2017 at 21:58, Roi Dayan <roid@mellanox.com> wrote:
> Since it's an error but also will always occur in older kernels
> log the message with level warning instead of info.
>
> Signed-off-by: Roi Dayan <roid@mellanox.com>
> ---

When I run this patch on a fedora system with kernel 4.8 and
out-of-tree modules, when running the "make check-kmod" tests, every
vxlan test now fails because the last step of the test checks the logs
for any log message with WARN or higher level, and this message shows
up. Looking at the other platforms affected, it seems like this will
always triggers on newer kernels in my test environment. Here's the
log:

2017-08-01T20:43:59.387Z|00053|dpif_netlink|WARN|Failed to create
at_vxlan0 with rtnetlink: Invalid argument

I wonder if the new rtnetlink infrastructure is not always working for
VXLAN, and this error message is just highlighting that? Eric, could
this be related to VXLAN-GPE?
Joe Stringer Aug. 1, 2017, 8:56 p.m. UTC | #3
On 1 August 2017 at 13:56, Joe Stringer <joe@ovn.org> wrote:
> On 29 July 2017 at 21:58, Roi Dayan <roid@mellanox.com> wrote:
>> Since it's an error but also will always occur in older kernels
>> log the message with level warning instead of info.
>>
>> Signed-off-by: Roi Dayan <roid@mellanox.com>
>> ---
>
> When I run this patch on a fedora system with kernel 4.8 and
> out-of-tree modules, when running the "make check-kmod" tests, every
> vxlan test now fails because the last step of the test checks the logs
> for any log message with WARN or higher level, and this message shows
> up. Looking at the other platforms affected, it seems like this will
> always triggers on newer kernels in my test environment. Here's the
> log:
>
> 2017-08-01T20:43:59.387Z|00053|dpif_netlink|WARN|Failed to create
> at_vxlan0 with rtnetlink: Invalid argument
>
> I wonder if the new rtnetlink infrastructure is not always working for
> VXLAN, and this error message is just highlighting that? Eric, could
> this be related to VXLAN-GPE?

Correction: The non-GPE VXLAN tests fail in this case.
Eric Garver Aug. 1, 2017, 10:49 p.m. UTC | #4
On Tue, Aug 01, 2017 at 01:56:44PM -0700, Joe Stringer wrote:
> On 1 August 2017 at 13:56, Joe Stringer <joe@ovn.org> wrote:
> > On 29 July 2017 at 21:58, Roi Dayan <roid@mellanox.com> wrote:
> >> Since it's an error but also will always occur in older kernels
> >> log the message with level warning instead of info.
> >>
> >> Signed-off-by: Roi Dayan <roid@mellanox.com>
> >> ---
> >
> > When I run this patch on a fedora system with kernel 4.8 and
> > out-of-tree modules, when running the "make check-kmod" tests, every
> > vxlan test now fails because the last step of the test checks the logs
> > for any log message with WARN or higher level, and this message shows
> > up. Looking at the other platforms affected, it seems like this will
> > always triggers on newer kernels in my test environment. Here's the
> > log:
> >
> > 2017-08-01T20:43:59.387Z|00053|dpif_netlink|WARN|Failed to create
> > at_vxlan0 with rtnetlink: Invalid argument
> >
> > I wonder if the new rtnetlink infrastructure is not always working for
> > VXLAN, and this error message is just highlighting that? Eric, could
> > this be related to VXLAN-GPE?
> 
> Correction: The non-GPE VXLAN tests fail in this case.

Yup, sorry. This broke with VXLAN-GPE, but we didn't notice because it
was falling back to the compat interface. A good example of why this log
needs to be higher. :)

I posted a fix.
Joe Stringer Aug. 1, 2017, 11:49 p.m. UTC | #5
On 1 August 2017 at 15:49, Eric Garver <e@erig.me> wrote:
> On Tue, Aug 01, 2017 at 01:56:44PM -0700, Joe Stringer wrote:
>> On 1 August 2017 at 13:56, Joe Stringer <joe@ovn.org> wrote:
>> > On 29 July 2017 at 21:58, Roi Dayan <roid@mellanox.com> wrote:
>> >> Since it's an error but also will always occur in older kernels
>> >> log the message with level warning instead of info.
>> >>
>> >> Signed-off-by: Roi Dayan <roid@mellanox.com>
>> >> ---
>> >
>> > When I run this patch on a fedora system with kernel 4.8 and
>> > out-of-tree modules, when running the "make check-kmod" tests, every
>> > vxlan test now fails because the last step of the test checks the logs
>> > for any log message with WARN or higher level, and this message shows
>> > up. Looking at the other platforms affected, it seems like this will
>> > always triggers on newer kernels in my test environment. Here's the
>> > log:
>> >
>> > 2017-08-01T20:43:59.387Z|00053|dpif_netlink|WARN|Failed to create
>> > at_vxlan0 with rtnetlink: Invalid argument
>> >
>> > I wonder if the new rtnetlink infrastructure is not always working for
>> > VXLAN, and this error message is just highlighting that? Eric, could
>> > this be related to VXLAN-GPE?
>>
>> Correction: The non-GPE VXLAN tests fail in this case.
>
> Yup, sorry. This broke with VXLAN-GPE, but we didn't notice because it
> was falling back to the compat interface. A good example of why this log
> needs to be higher. :)
>
> I posted a fix.

Indeed, I think that this shows that the log message should be a bit
higher level, and I tested this with your fix and no longer see such
messages.

I applied this patch to master, thanks folks.
diff mbox

Patch

diff --git a/lib/dpif-netlink.c b/lib/dpif-netlink.c
index 55effd1..118576c 100644
--- a/lib/dpif-netlink.c
+++ b/lib/dpif-netlink.c
@@ -972,7 +972,7 @@  dpif_netlink_rtnl_port_create_and_add(struct dpif_netlink *dpif,
     error = dpif_netlink_rtnl_port_create(netdev);
     if (error) {
         if (error != EOPNOTSUPP) {
-            VLOG_INFO_RL(&rl, "Failed to create %s with rtnetlink: %s",
+            VLOG_WARN_RL(&rl, "Failed to create %s with rtnetlink: %s",
                          netdev_get_name(netdev), ovs_strerror(error));
         }
         return error;