Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vnet_route_check Monit script fails when vnet routes are setup #12070

Closed
antonptashnik opened this issue Sep 14, 2022 · 4 comments
Closed

vnet_route_check Monit script fails when vnet routes are setup #12070

antonptashnik opened this issue Sep 14, 2022 · 4 comments
Assignees
Labels
NVIDIA Triaged this issue has been triaged

Comments

@antonptashnik
Copy link

Description

vnet_route_check script used by Monit exits with the error below when there are any Vnet routes configured

Traceback (most recent call last):
  File "/usr/local/bin/vnet_route_check.py", line 359, in <module>
    sys.exit(main())
  File "/usr/local/bin/vnet_route_check.py", line 330, in main
    app_db_vnet_routes = get_vnet_routes_from_app_db()
  File "/usr/local/bin/vnet_route_check.py", line 222, in get_vnet_routes_from_app_db
    intf = vnet_intfs[vnet_name][0]
KeyError: 'Vnet_v4_in_v4-0'

Note there is a PR that was intended to address the issue but the issue is still present. The PR is sonic-net/sonic-utilities#2268

Steps to reproduce the issue:

  1. Save each config below to a JSON file and apply with sudo config load filename.json
{    
"VXLAN_TUNNEL": {"tunnel_v4": {"src_ip": "10.1.0.32"}}
}
{
"VNET": {
  "Vnet_v4_in_v4-0": {
    "vxlan_tunnel": "tunnel_v4",
    "scope": "default",
    "vni": "10000",
    "peer_list": ""
}}}
{
"INTERFACE": {
  "Ethernet240": {
    "vnet_name": "Vnet_v4_in_v4-0"
}}}
  1. Run vnet_route_check script
/usr/local/bin/vnet_route_check.py

Describe the results you received:

Traceback (most recent call last):
  File "/usr/local/bin/vnet_route_check.py", line 359, in <module>
    sys.exit(main())
  File "/usr/local/bin/vnet_route_check.py", line 330, in main
    app_db_vnet_routes = get_vnet_routes_from_app_db()
  File "/usr/local/bin/vnet_route_check.py", line 222, in get_vnet_routes_from_app_db
    intf = vnet_intfs[vnet_name][0]
KeyError: 'Vnet_v4_in_v4-0'

Describe the results you expected:

Script finishes successfully with no interruption.

Output of show version:

SONiC Software Version: SONiC.master.147826-dirty-20220913.162946
Distribution: Debian 11.5
Kernel: 5.10.0-12-2-amd64
Build commit: b34d94be1
Build date: Tue Sep 13 16:35:17 UTC 2022
Built by: AzDevOps@sonic-build-workers-0023BK

Platform: x86_64-accton_as9516_32d-r0
HwSKU: newport
ASIC: barefoot
ASIC Count: 1
Serial Number: AJ19049805
Model Number: NP5ZZ8632007A
Hardware Revision: N/A
Uptime: 13:56:33 up  2:06,  3 users,  load average: 0.34, 0.56, 0.54
Date: Wed 14 Sep 2022 13:56:33

Output of show techsupport:

(paste your output here or download and attach the file here )

Additional information you deem important (e.g. issue happens only occasionally):

@prsunny
Copy link
Contributor

prsunny commented Sep 14, 2022

@volodymyrsamotiy , can you please check?

@zhangyanzhao zhangyanzhao added the Triaged this issue has been triaged label Sep 14, 2022
@antonptashnik
Copy link
Author

@zhangyanzhao I see you put "triaged" tag so I suppose the issue was investigated. Please provide any investigation results and URLs to pending fixes if present. Thanks in advance!

@volodymyrsamotiy
Copy link
Collaborator

I wasn't able to reproduce this issue on the image with the same hash (SONiC-OS-master.147814-b34d94be1).
I actually faced another error: "ValueError: Circular reference detected".
But I also tried on the latest image (SONiC-OS-master.162640-ef0559c03) and all looks working there.
Could you please check on latest image as well and confirm whether this issue is still reproducible in your case?

@prgeor prgeor added the NVIDIA label Mar 1, 2023
@prgeor
Copy link
Contributor

prgeor commented Mar 1, 2023

@antonptashnik closing for now. please open if reproducible.

@prgeor prgeor closed this as completed Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NVIDIA Triaged this issue has been triaged
Projects
None yet
Development

No branches or pull requests

5 participants