diff mbox series

[ovs-dev] northd: Log router name in "no path" next-hop warnings.

Message ID 20240918143030.806136-1-rosemarie@redhat.com
State Accepted
Headers show
Series [ovs-dev] northd: Log router name in "no path" next-hop warnings. | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Rosemarie O'Riorden Sept. 18, 2024, 2:30 p.m. UTC
This patch fixes ambiguous logs and provides context about which router
has a route configuration error. Now instead of just referring to routes
by their IP address, the router they're on is also listed.

Reported-at: https://issues.redhat.com/browse/FDP-777
Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
---
 northd/northd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Ales Musil Oct. 8, 2024, 8:05 a.m. UTC | #1
On Wed, Sep 18, 2024 at 4:35 PM Rosemarie O'Riorden <rosemarie@redhat.com>
wrote:

> This patch fixes ambiguous logs and provides context about which router
> has a route configuration error. Now instead of just referring to routes
> by their IP address, the router they're on is also listed.
>
> Reported-at: https://issues.redhat.com/browse/FDP-777
> Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>
> ---
>  northd/northd.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/northd/northd.c b/northd/northd.c
> index a267cd5f8..61f4f27ec 100644
> --- a/northd/northd.c
> +++ b/northd/northd.c
> @@ -10695,8 +10695,8 @@ get_outport_for_routing_policy_nexthop(struct
> ovn_datapath *od,
>      }
>
>      static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
> -    VLOG_WARN_RL(&rl, "No path for routing policy priority %d; next hop
> %s",
> -                 priority, nexthop);
> +    VLOG_WARN_RL(&rl, "No path for routing policy priority %d on router
> %s; "
> +                 "next hop %s", priority, od->nbr->name, nexthop);
>      return NULL;
>  }
>
> @@ -11433,8 +11433,8 @@ find_static_route_outport(struct ovn_datapath *od,
> const struct hmap *lr_ports,
>      if (!out_port || !lrp_addr_s) {
>          /* There is no matched out port. */
>          static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
> -        VLOG_WARN_RL(&rl, "No path for static route %s; next hop %s",
> -                     route->ip_prefix, route->nexthop);
> +        VLOG_WARN_RL(&rl, "No path for static route %s on router %s; next
> hop"
> +                     " %s", route->ip_prefix, od->nbr->name,
> route->nexthop);
>          return false;
>      }
>      if (p_out_port) {
> --
> 2.46.0
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <amusil@redhat.com>
Numan Siddique Oct. 8, 2024, 2:58 p.m. UTC | #2
On Tue, Oct 8, 2024 at 4:06 AM Ales Musil <amusil@redhat.com> wrote:
>
> On Wed, Sep 18, 2024 at 4:35 PM Rosemarie O'Riorden <rosemarie@redhat.com>
> wrote:
>
> > This patch fixes ambiguous logs and provides context about which router
> > has a route configuration error. Now instead of just referring to routes
> > by their IP address, the router they're on is also listed.
> >
> > Reported-at: https://issues.redhat.com/browse/FDP-777
> > Signed-off-by: Rosemarie O'Riorden <rosemarie@redhat.com>

Thanks.  Applied to main.


> > ---
> >  northd/northd.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/northd/northd.c b/northd/northd.c
> > index a267cd5f8..61f4f27ec 100644
> > --- a/northd/northd.c
> > +++ b/northd/northd.c
> > @@ -10695,8 +10695,8 @@ get_outport_for_routing_policy_nexthop(struct
> > ovn_datapath *od,
> >      }
> >
> >      static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
> > -    VLOG_WARN_RL(&rl, "No path for routing policy priority %d; next hop
> > %s",
> > -                 priority, nexthop);
> > +    VLOG_WARN_RL(&rl, "No path for routing policy priority %d on router
> > %s; "
> > +                 "next hop %s", priority, od->nbr->name, nexthop);
> >      return NULL;
> >  }
> >
> > @@ -11433,8 +11433,8 @@ find_static_route_outport(struct ovn_datapath *od,
> > const struct hmap *lr_ports,
> >      if (!out_port || !lrp_addr_s) {
> >          /* There is no matched out port. */
> >          static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
> > -        VLOG_WARN_RL(&rl, "No path for static route %s; next hop %s",
> > -                     route->ip_prefix, route->nexthop);
> > +        VLOG_WARN_RL(&rl, "No path for static route %s on router %s; next
> > hop"
> > +                     " %s", route->ip_prefix, od->nbr->name,
> > route->nexthop);
> >          return false;
> >      }
> >      if (p_out_port) {
> > --
> > 2.46.0
> >
> > _______________________________________________
> > dev mailing list
> > dev@openvswitch.org
> > https://mail.openvswitch.org/mailman/listinfo/ovs-dev
> >
> >
> Looks good to me, thanks.
>
> Acked-by: Ales Musil <amusil@redhat.com>
> --
>
> Ales Musil
>
> Senior Software Engineer - OVN Core
>
> Red Hat EMEA <https://www.redhat.com>
>
> amusil@redhat.com
> <https://red.ht/sig>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
diff mbox series

Patch

diff --git a/northd/northd.c b/northd/northd.c
index a267cd5f8..61f4f27ec 100644
--- a/northd/northd.c
+++ b/northd/northd.c
@@ -10695,8 +10695,8 @@  get_outport_for_routing_policy_nexthop(struct ovn_datapath *od,
     }
 
     static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
-    VLOG_WARN_RL(&rl, "No path for routing policy priority %d; next hop %s",
-                 priority, nexthop);
+    VLOG_WARN_RL(&rl, "No path for routing policy priority %d on router %s; "
+                 "next hop %s", priority, od->nbr->name, nexthop);
     return NULL;
 }
 
@@ -11433,8 +11433,8 @@  find_static_route_outport(struct ovn_datapath *od, const struct hmap *lr_ports,
     if (!out_port || !lrp_addr_s) {
         /* There is no matched out port. */
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(5, 1);
-        VLOG_WARN_RL(&rl, "No path for static route %s; next hop %s",
-                     route->ip_prefix, route->nexthop);
+        VLOG_WARN_RL(&rl, "No path for static route %s on router %s; next hop"
+                     " %s", route->ip_prefix, od->nbr->name, route->nexthop);
         return false;
     }
     if (p_out_port) {