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 2 commits
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
51 changes: 43 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,49 @@ 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:
-x, --asicname TEXT Asic name
Copy link
Contributor

Choose a reason for hiding this comment

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

why not use -n here ? similar to show chassis system_ports

Copy link
Contributor Author

@vganesan-nokia vganesan-nokia Jul 22, 2021

Choose a reason for hiding this comment

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

"-n" stands for "namespace". Only for system ports we get the system ports config info from databases from specific namespace. The "-x" option stands for "switch or asic". This is for getting info form chassis data bases in the supervisor card which is not in any specific namespace. The "-x" option is used for getting entries that have the given asic name in their keys. It is not used for accessing databases from different namespaces.

Copy link
Contributor

Choose a reason for hiding this comment

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

@vganesan-nokia. Thanks for the explanation.
The option is little confusing for me. For example the output for the command show chassis system-lags -x asic0 will display lags which have asic0 in the key from all linecards. Is this correct ?

Would it simple if we provide option to filter on linecard iso of asic ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vganesan-nokia. Thanks for the explanation.
The option is little confusing for me. For example the output for the command show chassis system-lags -x asic0 will display lags which have asic0 in the key from all linecards. Is this correct ?

[@vganesan-nokia] correct

Would it simple if we provide option to filter on linecard iso of asic ?

[@vganesan-nokia ] Even though we filter on specific asic, the entries will be shown with the full key, which includes the 'hostname'. So we can identify which asic is from which linecard (assuming 'hostname' has the string that identifies the linceard)

We can replace the "asicname" option. by filtering on 'hostname'. The asic name is the value of the mandatory attribute DEVICE_METADATA['localhost']['asic_name']. So we have this filter on asic name. For 'linecard' we do not have such thing. However, in the multi slot chassis system we have a convention (not a written rule but kind of best practice) of using the mandatory attribute DEVICE_METADATA['localhost']['hostname'] to identify linecard/slot. This 'hostname' must be unique within the chassis. This is following the model of non chassis multi-asic box where the 'hostname' holds the name of the box. In chassis systems since each card acts as a multi asic box, this convention is followed.

I feel that instead of replacing 'asicname' by 'hostname', we can have 'hostname' as additional option so that we can filter on entries for specific asic from a specific line card or entries from all asics of a specific line card. If you feel that this is too much filtering, I'll replace 'asicname' by 'hostname'.

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. Added option for filtering on host or linecard name.

--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