Added support for tunnel route status in show vnet routes all.#2341
Merged
siqbal1986 merged 5 commits intosonic-net:masterfrom Sep 15, 2022
siqbal1986:CLI_vnet_route_all_tunnel_route_status_addition
Merged
Added support for tunnel route status in show vnet routes all.#2341siqbal1986 merged 5 commits intosonic-net:masterfrom siqbal1986:CLI_vnet_route_all_tunnel_route_status_addition
siqbal1986 merged 5 commits intosonic-net:masterfrom
siqbal1986:CLI_vnet_route_all_tunnel_route_status_addition
Conversation
The status may be active, inactive or not present at all. The status field cna have 3 values. Empty : Configured but not in ASIC Active : Configured and active in ASIC. Inacive : Configured but not in ASIC due to lack ofr BFD session.
|
This pull request introduces 1 alert when merging 781806f into e45b47a - view on LGTM.com new alerts:
|
prsunny
reviewed
Sep 8, 2022
| click.echo() | ||
|
|
||
| header = ['vnet name', 'prefix', 'endpoint', 'mac address', 'vni'] | ||
| header = ['vnet name', 'prefix', 'endpoint', 'mac address', 'vni', 'status'] |
Contributor
There was a problem hiding this comment.
Please add tests so as to pass coverage
prsunny
reviewed
Sep 8, 2022
show/vnet.py
Outdated
| r.append(val.get('endpoint')) | ||
| r.append(val.get('mac_address')) | ||
| r.append(val.get('vni')) | ||
| r.append(val_state.get('state')) |
Contributor
There was a problem hiding this comment.
Can you check the output if the entry is not present in state_db?
prsunny
previously approved these changes
Sep 15, 2022
Contributor
|
Please raise a PR to 202012 |
prsunny
previously approved these changes
Sep 15, 2022
zjswhhh
approved these changes
Sep 15, 2022
siqbal1986
added a commit
that referenced
this pull request
Sep 15, 2022
#2375) * Added support for tunnel route status in show vnet routes all. * Added a test for the CLI. Fixed a bug. * Updated command reference.
dprital
added a commit
to dprital/sonic-buildimage
that referenced
this pull request
Sep 21, 2022
Update sonic-utilities submodule pointer to include the following: * 0a7557b [minigraph] add option to specify golden path in load_minigraph ([sonic-net#2350](sonic-net/sonic-utilities#2350)) * 322aefc [GCU]Remove GCU unique lane check for duplicate lanes platforms ([sonic-net#2343](sonic-net/sonic-utilities#2343)) * 7099fff [fastboot] fastboot enhancement: Use warm-boot infrastructure for fast-boot ([sonic-net#2286](sonic-net/sonic-utilities#2286)) * 09026ed [warm-reboot] fix warm-reboot when /tmp/cache is missing ([sonic-net#2367](sonic-net/sonic-utilities#2367)) * a3c404c Fix typo in platform_sfputil_helper.is_rj45_port ([sonic-net#2374](sonic-net/sonic-utilities#2374)) * 637d834 Vnet_route_check Vxlan tunnel route update. ([sonic-net#2281](sonic-net/sonic-utilities#2281)) * 29a3e51 Added support for tunnel route status in show vnet routes all. ([sonic-net#2341](sonic-net/sonic-utilities#2341)) * 1ac584b Use 'default' VRF when VRF name is not provided ([sonic-net#2368](sonic-net/sonic-utilities#2368)) * 4d377a6 [subinterface]Added additional checks in portchannel and subinterface commands ([sonic-net#2345](sonic-net/sonic-utilities#2345)) * bbcdf2e disk_check: Publish event for RO state ([sonic-net#2320](sonic-net/sonic-utilities#2320)) * 3fd537b Support the bandit check by GitHub Action ([sonic-net#2358](sonic-net/sonic-utilities#2358)) * 491d3d3 [generate dump]Added error message when saisdkdump fails ([sonic-net#2356](sonic-net/sonic-utilities#2356)) * 6830e01 [counterpoll]Fixing counterpoll show for tunnel and acl stats ([sonic-net#2355](sonic-net/sonic-utilities#2355)) * 3be2ad7 [fast-reboot]Avoid stopping masked services during fast-reboot ([sonic-net#2335](sonic-net/sonic-utilities#2335)) * 0e1b0cf [GCU] Fix missing backend in dry run ([sonic-net#2347](sonic-net/sonic-utilities#2347)) * 676c31b Add verification for override ([sonic-net#2305](sonic-net/sonic-utilities#2305)) * 48997c2 Add Password Hardening CLI support ([sonic-net#2338](sonic-net/sonic-utilities#2338)) * 414e239 update unit tests for swap ([#locato](https://github.com/sonic-net/sonic-utilities/pull/locato)) * a91a492 consider swap checking memory in ([#stalle](https://github.com/sonic-net/sonic-utilities/pull/stalle)) * f0ce586 [route_check]: Ignore standalone tunnel routes ([sonic-net#2325](sonic-net/sonic-utilities#2325)) Signed-off-by: dprital <drorp@nvidia.com>
7 tasks
Contributor
|
@siqbal1986 , this change cannot be cherry-picked to 202205 branch cleanly. Can you raise a separate PR? |
EdenGri
pushed a commit
to EdenGri/sonic-utilities
that referenced
this pull request
Oct 12, 2022
…-net#2341) * Added support for tunnel route status in show vnet routes all. * Added a test for the CLI. Fixed a bug. * Updated command reference.
mdanish-kh
pushed a commit
to hamnarauf/sonic-utilities
that referenced
this pull request
Oct 22, 2022
…-net#2341) * Added support for tunnel route status in show vnet routes all. * Added a test for the CLI. Fixed a bug. * Updated command reference.
siqbal1986
added a commit
to siqbal1986/sonic-utilities
that referenced
this pull request
Nov 2, 2022
…-net#2341) * Added support for tunnel route status in show vnet routes all. * Added a test for the CLI. Fixed a bug. * Updated command reference.
siqbal1986
added a commit
that referenced
this pull request
Nov 3, 2022
orignal PR #2341 The status information is retrieved using the status of the prefix from Application DB. The status field can have 3 values. Empty : Configured but not in Application DB. Active : Configured and active in ASIC. Inacive : Configured but not in ASIC due to lack of BFD session with endpoint How to verify it Add a vxlan tunnel route with single Endpoint monitoring. run the command to see active/ inactive based on BFD session state. if multiple Endpoints are present then atleast one has to be Up for status to show up as active. if endpoint monitoring is not enabled then status would show up as active. Previous command output (if the output of a command-line utility has changed) vnet name prefix endpoint mac address vni Vnet1 10.2.1.0/24 200.3.152.32 Vnet_v4_in_v4-0 150.62.191.1/32 100.251.99.1,100.251.99.2,100.251.99.3 Vnet_v6_in_v6-0 fddd:a150:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1 test_v4_in_v4-0 160.62.191.1/32 100.251.7.1 test_v4_in_v4-0 160.63.191.1/32 100.251.7.2 test_v4_in_v4-0 160.64.191.1/32 100.251.7.3 New command output (if the output of a command-line utility has changed) vnet name prefix endpoint mac address vni status Vnet1 10.2.1.0/24 200.3.152.32 active Vnet_v4_in_v4-0 150.62.191.1/32 100.251.99.1,100.251.99.2,100.251.99.3 Vnet_v6_in_v6-0 fddd:a150:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1 inactive test_v4_in_v4-0 160.62.191.1/32 100.251.7.1 inactive test_v4_in_v4-0 160.63.191.1/32 100.251.7.2 inactive test_v4_in_v4-0 160.64.191.1/32 100.251.7.3 inactive
preetham-singh
pushed a commit
to preetham-singh/sonic-utilities
that referenced
this pull request
Nov 21, 2022
…-net#2341) * Added support for tunnel route status in show vnet routes all. * Added a test for the CLI. Fixed a bug. * Updated command reference.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What I did
This commit adds a new status filed in CLI "show vnet routes all"
How I did it
The status information is retrieved using the status of the prefix from Application DB.
The status field can have 3 values.
Empty : Configured but not in Application DB.
Active : Configured and active in ASIC.
Inacive : Configured but not in ASIC due to lack of BFD session with endpoint
How to verify it
Add a vxlan tunnel route with single Endpoint monitoring. run the command to see active/ inactive based on BFD session state.
if multiple Endpoints are present then atleast one has to be Up for status to show up as active.
if endpoint monitoring is not enabled then status would show up as active.
Previous command output (if the output of a command-line utility has changed)
vnet name prefix endpoint mac address vni
Vnet1 10.2.1.0/24 200.3.152.32
Vnet_v4_in_v4-0 150.62.191.1/32 100.251.99.1,100.251.99.2,100.251.99.3
Vnet_v6_in_v6-0 fddd:a150:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1
test_v4_in_v4-0 160.62.191.1/32 100.251.7.1
test_v4_in_v4-0 160.63.191.1/32 100.251.7.2
test_v4_in_v4-0 160.64.191.1/32 100.251.7.3
New command output (if the output of a command-line utility has changed)
vnet name prefix endpoint mac address vni status
Vnet1 10.2.1.0/24 200.3.152.32 active
Vnet_v4_in_v4-0 150.62.191.1/32 100.251.99.1,100.251.99.2,100.251.99.3
Vnet_v6_in_v6-0 fddd:a150:a251::a6:1/128 fddd:a100:a251::a10:1,fddd:a101:a251::a10:1 inactive
test_v4_in_v4-0 160.62.191.1/32 100.251.7.1 inactive
test_v4_in_v4-0 160.63.191.1/32 100.251.7.2 inactive
test_v4_in_v4-0 160.64.191.1/32 100.251.7.3 inactive