Skip to content

[202412] Add FRR failed route check in route_check.py#284

Merged
r12f merged 1 commit intoAzure:202412from
ZhaohuiS:ZhaohuiS/route_check_failed_frr
Feb 16, 2026
Merged

[202412] Add FRR failed route check in route_check.py#284
r12f merged 1 commit intoAzure:202412from
ZhaohuiS:ZhaohuiS/route_check_failed_frr

Conversation

@ZhaohuiS
Copy link
Contributor

What I did

Cherry-pick of sonic-net/sonic-utilities#4119 to 202412 branch with conflict resolution.

It supports to detect the route with offload False or without offload, which can capture queued route, because queued route doesn't have offload, but for rejected route, the offload is True. It can't detect the rejected route.
So, we add a new detection check for the value of key failed for route entries, which can cover both rejected and queued routes.
It will help to detect rejected route and queued route on device.

How I did it

Append failed route prefix into failed list, if it's not empty, script will print error message into syslog

        # Check for failed state
        if entry.get('failed', False):
            failed_rt.append(route_prefix)

How to verify it

  • For rejected route: route_check.py will report failed_FRR_routes in the failure results
  • For queued route: route_check.py will report both missed_FRR_routes and failed_FRR_routes

Conflict resolution notes

The 202412 branch of Azure/sonic-utilities.msft has a different code structure from sonic-net/sonic-utilities master:

  • Uses get_frr_routes() instead of get_frr_routes_parallel()
  • Uses namespace-keyed results dict (results[namespace])
  • Test case numbering starts from 35 (last existing case is 34)

All changes were adapted to match the 202412 branch code style.

Cherry-pick from sonic-net/sonic-utilities PR #4119 with conflict resolution.
Add detection for routes with failed state in FRR, covering both rejected
and queued routes. Previously only offload flag was checked which could not
detect rejected routes (offload is True for rejected routes).

Changes:
- Add failed_rt list to track routes with failed state
- Return both missed_rt and failed_rt from check_frr_pending_routes()
- Report failed FRR routes in results and syslog
- Add test cases 35-38 for failed route detection
@ZhaohuiS ZhaohuiS changed the title Add FRR failed route check in route_check.py [202412] Add FRR failed route check in route_check.py Feb 12, 2026
@r12f r12f merged commit 9f669da into Azure:202412 Feb 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants