Skip to content

[VOQ LAG HLD] Updates for show commands #802

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

Merged
merged 4 commits into from
Aug 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 44 additions & 8 deletions doc/voq/lag_hld.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# LAG on Distributed VOQ System
# High Level Design Document
### Rev 1.0
### Rev 1.1

# Table of Contents
* [List of Tables](#list-of-tables)
Expand Down Expand Up @@ -42,6 +42,7 @@
| Rev | Date | Author | Change Description |
|:---:|:-----------:|:-----------------------------------------------------------------------------------------:|-----------------------------------|
| 1.0 | | Srikanth Keesara, Vedavinayagam Ganesan, Sureshkannan Duraisamy (Nokia's Sonic Team) | Initial version |
| 1.1 | | Vedavinayagam Ganesan (Nokia's Sonic Team) | Updates for show commands |

# About this Manual
This document describes changes needed for the correct operation of LAG in a distributed VOQ system.
Expand Down Expand Up @@ -545,15 +546,50 @@ Shown below is the new attribute of SAI_OBJECT_TYPE_LAG object that is used for

## 8 Example Show Commands

The system lag information are taken from **SYSTEM_LAG_TABLE** of **CHASSIS_APP_DB** from supervisor card.

The show commands for system lags are under **show chassis** commands group as show below

```
admin@Linecard2:~$ show chassis -h
Usage: show chassis [OPTIONS] COMMAND [ARGS]...

Chassis commands group

Options:
-h, -?, --help Show this message and exit.

Commands:
modules Show chassis-modules information
system-lags Show VOQ system lags information
system-neighbors Show VOQ system neighbors information
system-ports Show VOQ system ports information
admin@Linecard2:~$
```
admin@sonic:~$ show interfaces portchannel system
Flags: A - active, I - inactive, Up - up, Dw - Down, N/A - not available,
S - selected, D - deselected, * - not synced, L - local switch
No. Switch ID LAG Name Protocol Ports
----- ---------- ----------- ---------- --------------
1 0(L} PortChannel1 SystemLAG Slot1|Asic0|Ethernet1(S) Slot1|Asic0|Ethernet2(S)
2 6 PortChannel1 SystemLAG Slot2|Asic0|Ethernet1(S) Slot2|Asic0|Ethernet2(S)
### Syntax
```
admin@Linecard2:~$ show chassis system-lags -h
Usage: show chassis system-lags [OPTIONS] [SYSTEMLAGNAME]

Show VOQ system lags information

Options:
-d, --display [all] Show internal interfaces [default: all]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The help string is incorrect

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Removed "-d" option

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are displaying internal lag information, I think we dont need the -d option.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. We do not need the -d option. I'll remove this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

-n, --namespace [] Namespace name or all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elabarote what will the difference in output between the commands show chassis system-lags and show chassis system-lags -n asic0 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intention was to use this to display the lags from a specific asic. The system lag name includes the DEVICE_METADATA['localhost']['asic_name'] which is expected to be same as the namespace name. If not, this will not work.
Do you think we can remove this option?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Since the system lag info is retrieved form chassis app db, which in global name space in supervisor card (i.e., it is namespace agnostic), instead of using namespace option, an option is introduced to take the asic_name (this need not be namespace name) which is used for filtering the output for the given specific asic.

--verbose Enable verbose output
-?, -h, --help Show this message and exit.
admin@Linecard2:~$
```
### Sample output
```
admin@Linecard2:~$ show chassis system-lags
System Lag Name Lag Id Switch Id Member System Ports
---------------------------- -------- ----------- ------------------------------------------------------
Linecard2|Asic0|PortChannel1 2 6 Linecard2|Asic0|Ethernet10, Linecard2|Asic0|Ethernet11
Linecard4|Asic0|PortChannel1 1 18 Linecard4|Asic0|Ethernet7, Linecard4|Asic0|Ethernet20
admin@Linecard2:~$
```

## 9 Test Considerations

### test_virtual_chassis.py
Expand Down