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

[202205] 'portstat -j' avoid non json output for multi-asic/chassis duts #2875

Closed
wants to merge 156 commits into from

Conversation

wenyiz2021
Copy link
Contributor

This is cherry pick of: #2874
ADO: https://msazure.visualstudio.com/One/_workitems/edit/24260584
fix issue: sonic-net/sonic-buildimage#15439

What I did

How I did it

How to verify it

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

vdahiya12 and others added 30 commits June 7, 2022 21:33
… in config/show muxcable commands (sonic-net#2189)

Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
this PR enhances the show mux status output to include the cable -type and soc_ipv4 and config mux mode is corrected to include soc_ipv4 an cable_type when the mux mode entry is overwritten.

admin@sonic-1:~$ show mux config
SWITCH_NAME        PEER_TOR
-----------------  ----------
svcstr-7050-acs-2  10.1.0.33
port        state    ipv4             ipv6               cable_type      soc_ipv4
----------  -------  ---------------  -----------------  --------------  ---------------
Ethernet4   auto     192.168.0.2/32   fc02:1000::2/128   active-active   192.168.0.3/32
Ethernet8   auto     192.168.0.4/32   fc02:1000::4/128   active-active   192.168.0.5/32
Ethernet12  auto     192.168.0.6/32   fc02:1000::6/128   active-active   192.168.0.7/32
Ethernet16  auto     192.168.0.8/32   fc02:1000::8/128   active-active   192.168.0.9/32
Ethernet20  auto     192.168.0.10/32  fc02:1000::a/128   active-active   192.168.0.11/32
Ethernet24  auto     192.168.0.12/32  fc02:1000::c/128   active-active   192.168.0.13/32
Ethernet28  auto     192.168.0.14/32  fc02:1000::e/128   active-active   192.168.0.15/32
Ethernet32  auto     192.168.0.16/32  fc02:1000::10/128  active-active   192.168.0.17/32
Ethernet36  auto     192.168.0.18/32  fc02:1000::12/128  active-active   192.168.0.19/32
Ethernet40  auto     192.168.0.20/32  fc02:1000::14/128  active-active   192.168.0.21/32
Ethernet44  auto     192.168.0.22/32  fc02:1000::16/128  active-active   192.168.0.23/32
Ethernet48  auto     192.168.0.24/32  fc02:1000::18/128  active-active   192.168.0.25/32
Ethernet52  auto     192.168.0.26/32  fc02:1000::1a/128  active-standby
Ethernet56  auto     192.168.0.28/32  fc02:1000::1c/128  active-standby
Ethernet60  auto     192.168.0.30/32  fc02:1000::1e/128  active-standby
Ethernet64  auto     192.168.0.32/32  fc02:1000::20/128  active-standby
Ethernet68  auto     192.168.0.34/32  fc02:1000::22/128  active-standby
Ethernet72  auto     192.168.0.36/32  fc02:1000::24/128  active-standby
Ethernet76  auto     192.168.0.38/32  fc02:1000::26/128  active-standby
Ethernet80  auto     192.168.0.40/32  fc02:1000::28/128  active-standby
Ethernet84  auto     192.168.0.42/32  fc02:1000::2a/128  active-standby
Ethernet88  auto     192.168.0.44/32  fc02:1000::2c/128  active-standby
Ethernet92  auto     192.168.0.46/32  fc02:1000::2e/128  active-standby
Ethernet96  auto     192.168.0.48/32  fc02:1000::30/128  active-standby
What I did
modify config mux mode logic to be correct;
enhanced show mux config to display cable-type and soc_ipv4 if present

How I did it
How to verify it
UT and ran the changes on arista testbed

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
Signed-off-by: vaibhav-dahiya vdahiya@microsoft.com
For active-standby type cable there will not be any soc_ipv4 entry in the "MUX_CABLE" table, hence when updating the config DB entry with update
for
sudo config mux mode <state> <port>
we should just check the cable_type and update the table entry
if no soc_ipv4 the value written in none in that case

What I did
How I did it
How to verify it
Unit-tests cover the change

Signed-off-by: vaibhav-dahiya <vdahiya@microsoft.com>
In generate_dump script, the function collect_broadcom tries to dump BCM XGS commands
even in DNX switchs and error message is printed, hence generate_dump command fails.
Modified the collect_broadcom function to check for BCM family and dump
the DNX commands if the family is DNX.

Signed-off-by: Sakthivadivu Saravanaraj sakthivadivu.saravanaraj@nokia.com

What I did
Modified the generate_dump script to dump the corresponding Broadcom diag shell commands based on Broadcom asic family.

How I did it
Modified the collect_broadcom function in generate_dump to get the Broadcom asic family by extracting the "version" command output as per Broadcom's suggestion and dump the Broadcom DNX commands if the Broadcom asic is DNX family.
If it is not DNX family, dump the existing XGS commands.

How to verify it
Ran sonic cli command "sudo generate_dump " in DNX platform and XGS platform and verified that the tgz files are created with all the information dumped by generate_dump script.

Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
…onic-net#2180)

* [subinterface]Fixing static route add command to accept subinterface as dev
… is removed (sonic-net#2181)

* Avoid removing the subinterface when last configured ip is removed
Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
#### What I did

Fixes sonic-net#2119

#### Previous command output (if the output of a command-line utility has changed)
Sorting output:
```
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassive"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPSLBPassive", "value": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}]

```
#### New command output (if the output of a command-line utility has changed)

Sorting output:
```
Patch Applier: Applying 4 changes in order:
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE/BGPSLBPassiveV6"}]
Patch Applier:   * [{"op": "remove", "path": "/BGP_PEER_RANGE"}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE", "value": {"BGPSLBPassive": {"ip_range": ["10.255.0.0/25"], "name": "BGPSLBPassive", "src_address": "10.1.0.32"}}}]
Patch Applier:   * [{"op": "add", "path": "/BGP_PEER_RANGE/BGPVac", "value": {"ip_range": ["192.168.0.0/21"], "name": "BGPVac", "src_address": "10.1.0.32"}}]
```
What I did
Modify the override-config-table testcase to cover PORT admin_status scenario.

How I did it
add the testcase to cover PORT admin_status change.

How to verify it
Run unit test.
…2174)

#### What I did
Fixes sonic-net#2170

Converting xpath to path:
- There is only 1 case where the path is referring to the list itself. Example:
```
path="/BUFFER_PORT_EGRESS_PROFILE_LIST/Ethernet9/profile_list",
xpath="/sonic-buffer-port-egress-profile-list:sonic-buffer-port-egress-profile-list/BUFFER_PORT_EGRESS_PROFILE_LIST/BUFFER_PORT_EGRESS_PROFILE_LIST_LIST[port='Ethernet9']/profile_list",
```
- There is no other case as we the list is just a single string, and we cannot refer to individual elements in string in ConfigDb.

Converting path to xpath, there are 2 cases:
- Xpath is pointing to leaf-list as a whole, return path of whole list
```
xpath="/sonic-buffer-port-egress-profile-list:sonic-buffer-port-egress-profile-list/BUFFER_PORT_EGRESS_PROFILE_LIST/BUFFER_PORT_EGRESS_PROFILE_LIST_LIST[port='Ethernet9']/profile_list",
path="/BUFFER_PORT_EGRESS_PROFILE_LIST/Ethernet9/profile_list",
```
- Xpath is pointing to an element of the leaf-list, return path of whole list as well since it is not possible to point to specific element -- here we are pointing to the element `egress_lossy_profile`
```
xpath="/sonic-buffer-port-egress-profile-list:sonic-buffer-port-egress-profile-list/BUFFER_PORT_EGRESS_PROFILE_LIST/BUFFER_PORT_EGRESS_PROFILE_LIST_LIST[port='Ethernet9']/profile_list[.='egress_lossy_profile']",
path="/BUFFER_PORT_EGRESS_PROFILE_LIST/Ethernet9/profile_list",
```

#### How I did it
Only a single change if the xpath is pointing to a specific element, just return whole list token from ConfigDb format.

Please note this solution is future proof, if ConfigDb changes how a list is saved as a string or json list, we don't care.

#### How to verify it
unit-test

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
What I did
When GCU config NTP_SERVER table, its change is not actually taken info effect. Because NTP service is not restarted. So I add NTP service validator and restart service when NTP_SERVER is changed.

How I did it
When NTP_SERVER table being configured through GCU, the ntp service will restart.

How to verify it
Run GCU E2E test for NTP_SERVER table.
…nd (sonic-net#2219)

- What I did
Fix the header for "show ipv6 interface" output that display "IPv4" instead of "IPv6"
This PR fix the following issue: sonic-net/sonic-buildimage#11124

- How I did it
Check if the table is for IPv4 or IPv6 and present the header accordingly. In addition, adjust the UT

- How to verify it
Run "show ip interface" CLi command and verify that the output header present "IPv4"
Run "show ipv6 interface" CLi command and verify that the output header present "IPv6"
…sabled (sonic-net#2200) (sonic-net#2226)

- What I did
Fixed config reload when timer based delayed services are disabled. When they are disabled, the property property=LastTriggerUSecMonotonic returns "0". This will cause config reload to fail even though all enabled services are up.

- How I did it
Fixed the delayed services logic to check if the services are enabled before getting the property LastTriggerUSecMonotonic . Additionally fixed the return codes when config reload fails due to system checks

- How to verify it
Added UT to verify it. Modified sonic-mgmt tests to verify it additionally.

Signed-off-by: Sudharsan Dhamal Gopalarathnam <sudharsand@nvidia.com>
#### What I did
Fixes sonic-net#2034

Which lists where handled before in ConfigDb to YANG conversion?
- Dictionary of key to Object e.g.
```
"TACPLUS_SERVER": {
    "1.1.1.1": {            <= Key: Object (i.e. {...})
        "priority": "1", 
        "tcp_port": "49"
    }, 
    "1.1.1.2": {
        "priority": "1", 
        "tcp_port": "49"
    },
    "1.1.1.3": {
        "priority": "1", 
        "tcp_port": "49"
    } 
}
```
- List of values
```
"VLAN": {
    "Vlan1000": {
        "vlanid": "1000",
        "dhcp_servers": [    <= Values
            "192.0.0.1",
            "192.0.0.2",
            "192.0.0.3",
            "192.0.0.4"
        ]
    }
}
```
- But there is no handling of Dictionary of Key to Value
```
"DOT1P_TO_TC_MAP": {
    "Dot1p_to_tc_map1": {    <= Key: Value
            "1": "1",
            "2": "2",
            "3": "1",
            "4": "2"
        }
    },
```

Refer to sonic-net/sonic-buildimage#7375 for more info about how Type 1 list ConfigDb is getting converted to SonicYang.

After checking how type1 is handled during ConfigDb to SonicYang conversion. Check the unit-tests here for converting ConfigDb Path to SonicYang xpath.


Also added CABLE_LENGTH to ADD_RACK and REMOVE_RACK tests.

#### How I did it

When handling a list, check if it is of type1. If that's the case call type1 list handling.

#### How to verify it
unit-test

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
…rocess Execution and removed default timeout (sonic-net#2230)

Thus moved the core/log collection to the end.

But there is a catch regarding the above change, For eg: system is in a unstable state and most of the individual commands start to timeout, the techsupport dump eventually times out at 30m (because of the global timeout), then the dump is pretty useless, since it might not have any useful information at all
Thus, i've removed the default global timeout, Clients can/should knowingly provide a value using -g option if the execution time has to be capped.

A global timeout of 60 mins is used for Global timeout for Auto-techsupport invocation.

Co-authored-by: Vivek Reddy Karri <vkarri@nvidia.com>
…2237)

What I did
Added check to not allow deleting PortChannel if its member of vlan.

How I did it
Added a check in the command script.

How to verify it
Create a portchannel.
Add the portchannel to a vlan.
Try to delete the portchannel.
It should throw an error message.
Previous command output (if the output of a command-line utility has changed)
New command output (if the output of a command-line utility has changed)
Error: PortChannel1 has vlan Vlan100 configured, remove vlan membership to proceed

Co-authored-by: anilkpan <47642449+anilkpan@users.noreply.github.com>
…ntal YANG validator (sonic-net#2234)

#### What I did
- Added a new supplemental YANG validator to validate UniqueLanes in `validate_config_db_config`
- Removed UniqueLanesMoveValidator as the lanes validation will be taken care of by FullConfigMoveValidator which uses `validate_config_db_config`

The benefit of this is at the beginning of `apply-patch` we make a call to `validate_config_db_config` to check if the given patch is valid or not ([code](https://github.com/Azure/sonic-utilities/blob/e6e4f8ceb9a59fb7b3767a65ffc4f017d0807832/generic_config_updater/patch_sorter.py#L1522)). Now we will fail early, instead of going for the move generation and not being able to generate a moves.

#### How I did it
Check code.

#### How to verify it
Added unit-tests.

#### Previous command output (if the output of a command-line utility has changed)

#### New command output (if the output of a command-line utility has changed)
* [config/load_mgmt_config] Support load IPv6 mgmt IP

Signed-off-by: Jing Kan jika@microsoft.com
What I did
Replace status in show mux status with APP DB MUX_CABLE_TABLE:<port_name>, which is written by linkmgrd and indicates linkmgrd's state transition.

This change is required for active-active dualtor setup. In active-active setup, we care more about whether state transition happens on ToR side. In tests, we want to see if linkmgrd makes immediate reaction on link state changes. If we continue to use STATE DB entries, when gRPC is not available, we will get unknow in show mux status, which is not informatic and not the actual value we want to check.

sign-off: Jing Zhang zhangjing@microsoft.com

How I did it
Use APP DB entries instead of STATE DB.

Move STATE DB to column SERVER_STATUS.

How to verify it
Unit tests with mock DB values.
Tests on dual testbeds.
What I did
Add new CLI support to show tunnel route objects in ASIC DB.
sign-off: Jing Zhang zhangjing@microsoft.com

How I did it
Check if tunnel route object exists for server_ipv4, server_ipv6, soc_ipv4. If existing, print it out.
If not specifying port name, print all tunnel route objects.

How to verify it
Added unit tests.
Tested on dual testbed.
- What I did
Add support for IP interface loopback action.

- How I did it
Add new commands and handilig, Update the commad reference guide to incldue the new show command

- How to verify it
New CLI unittests were added.

Previous command output (if the output of a command-line utility has changed)
None

New command output (if the output of a command-line utility has changed)
root@sonic:~# config interface ip loopback-action Ethernet0 drop
root@sonic:~# show ip interfaces loopback-action
Interface        Action      
------------     ----------  
Ethernet232   drop
Vlan100          forward
Signed-off-by: Neetha John <nejo@microsoft.com>

What I did
Load backend acl template as part of the load minigraph if the device type is a 'BackEndToRRouter' and the device is a storage device

How to verify it
Added unit tests to verify if the backend acl load commands are applied
What I did
show command support for System Ready Feature Implementation .
Also sonic-package-manager support for app readiness.

"show system-health sysready-status"
"show system-health sysready-status detail"
"show system-health sysready-status brief"

How I did it
Introduce "show system-health sysready-status" click CLI with options.

How to verify it
Check the click CLIs introduced.
…sonic-net#2272)

To add room for db_migrator changes in 202012 branch, changed the major version on master/202205 branches from "2" to "3"

This change is needed:
1. Since the existing master/202205 db versions cannot be backported to 202012 as they are not relevant to 202012.
Current latest DB version for 202012 is 2_0_0, to add newer versions 2_0_1 cannot be added as it is already used for master/202205 branch.
2. Since master/202205 branches should incremented major version that was reserved for 202012. Since 202205 used same major version as 202012, there is no place for migrator changes to go into 202012 branch.

Changed major version on migrator script. Updated test files.

Signed-off-by: Vaibhav Hemant Dixit <vaibhav.dixit@microsoft.com>
…n RJ45 ports (sonic-net#2111)

* enhance show interface transceiver eeprom logic with RJ45 port support

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* enhance sfputil to support RJ45 port, exclude error status

* fix sfputil issue on RJ45 port

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* [RJ45] change the way to judge port type and add more UT test case

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* [sfputil] simplity the logic for RJ45 support

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* Support sfputil show present

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Support rj45 in sfpshow

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Add test case for sfputil with RJ45 supported

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Add mock data for RJ45 ports into STATE_DB

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Add test for sfputil show for RJ45 ports

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* remove debug code in sfputil test case

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* remove unnecessary argument for format()

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* Revert the logic to fetch presence status from error status for RJ45 port (sonic-net#17)

* Revert the logic to fetch presence status from error status

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Unit test

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Fix error

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* Add test cases to cover lpmode and error status

Signed-off-by: Stephen Sun <stephens@nvidia.com>

* add comments to describe the usage of functions to judge the port type

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* add more testcase for sfputil

Signed-off-by: Kebo Liu <kebol@nvidia.com>

* fix typo in testcase name

Signed-off-by: Kebo Liu <kebol@nvidia.com>

Co-authored-by: Stephen Sun <stephens@nvidia.com>
Co-authored-by: Stephen Sun <5379172+stephenxs@users.noreply.github.com>
* fix for non-coherent cmis modules

* addressing comments

* add back application_advertisement

* fixing test failure

Co-authored-by: Chuan Qin (QINCHUAN) <QINCHUAN@ame.gbl>
Signed-off-by: bingwang <wang.bing@microsoft.com>

What I did
This PR is to update the db_migrator to support generation of PORT_QOS_MAP|global.

After PR sonic-net/sonic-buildimage#10565, there will be two DSCP_TO_TC_MAP

DSCP_TO_TC_MAP|AZURE is the default map, which is used at port level and switch level
DSCP_TO_TC_MAP|AZURE_TUNNEL is used to remap the priority of tunnel traffic in dualtor deployment
To address the issue, an entry PORT_QOS_MAP|global will be added into config_db

"PORT_QOS_MAP": {
        "global": {
            "dscp_to_tc_map": "AZURE"
        }
}
To handle the upgrade from older image, db_migrator is updated to generate the entry.
There is no way to check if PORT_QOS_MAP|global is supported, so the migration is ran on all platforms. There is check in sonic-swss to check the switch capability code, so it will not cause issue.

How I did it
Update db_migrator to add a common migration step.

How to verify it
Verified by vstest
…w platform (sonic-net#2213)

What I did
Gave cisco-8000 the ability to add sub-commands under show platform <> in our downstream repo. Currently every time we want to add/remove/update a cli, we must raise a PR upstream.

How I did it
I have the cisco-8000.py module import a list of click commands that are written in a module that is located in our platform code.

How to verify it
Run show platform -h to see all commands. We will be able to see show platform inventory. This is only available on cisco devices.
…n multiasic platform (sonic-net#2258)

What I did
Function stop_sonic_service() in /usr/local/bin/reboot script doesn't handle stopping the Asic syncd# on multiasic platform. Instead, it only stops the syncd on non-multiasic platform. When issue command "sudo reboot", the below message will be shown.

admin@sonic:~$ sudo reboot
Error: No such container: syncd
Fixes sonic-net/sonic-buildimage#11377

How I did it
Add code the stop_sonic_services() to check and get NUM_ASIC. If it is multiasic, looping all asics and call the syncd_request_shutdown for each asic.

How to verify it
Issue the "sudo reboot" on the multiasic platform, the error message "Error: No such container: syncd" should not be shown.
dgsudharsan and others added 27 commits December 20, 2022 11:11
…ce in default-vrf (sonic-net#2564)

* Fixes #12170: Delete subinterface and recreate the subinterface  in default-vrf while unbinding subinterface from user defined vrf.
… by paraller function execution (sonic-net#2565)

- What I did
Optimize the execution time of the 'show techsupport' script.

- How I did it
The show techsupport CLI command calls the generate_dump bash script. In the script, there are a many functions that do the next scenario:

1. Run some CLI command
2. Save output from step 1 to the temporary file
3. Append the temporary file from step 2 to the `/var/dump/sonic_dump_XXXX.tar` file
4. Delete the temporary file from step 2
This PR will add the execution of these functions in parallel manner. Also, it will not spawn too many processes to not waste all CPU time.

- How to verify it
First test scenario

Run the `time show techsupport` CLI command and compare the execution time to the original script (with no parallelism), the execution time will be decreased by 10-20%.
Second test scenario

1. Stuck the FW by using next commands
	a. mcra /dev/mst/mt52100_pci_cr0 0xa01e4 0x10
	b. mcra /dev/mst/mt52100_pci_cr0 0xa05e4 0x10
	c. mcra /dev/mst/mt52100_pci_cr0 0xa07e4 0x10
	d. mcra /dev/mst/mt52100_pci_cr0 0xa09e4 0x10
	e. mcra /dev/mst/mt52100_pci_cr0 0xa0be4 0x10
	f. mcra /dev/mst/mt52100_pci_cr0 0xa0de4 0x10
	g. mcra /dev/mst/mt52100_pci_cr0 0xa0fe4 0x10
2. Run the `time show techsupport` CLI command and compare the execution time to the original script (with no parallelism), the execution time will be decreased by up to 50% because inside the script we launch CLI commands with `timeout --foreground 5m`. 

Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
- What I did
I fixed the timer unit template to account "wanted-by" option in the manifest. In case service is delayed, "wanted-by" is applied to the timer unit that delays it.

- How I did it
I updated timer.unit.j2 template

- How to verify it
Make sure that "WantedBy" is rendered in the timer unit.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
…onic-net#2568)

This is to cherry-pick sonic-net#2556 to 202205
All the PGs between minimal and maximal indexes are displayed regardless of whether they are configured.
Originally, watermark counters were enabled for all PGs, so there is no issue.
Now, watermark counters are enabled only for PGs with buffer configured, eg. if PG 0/2/3/4/6, is configured, PG 0-6 will be displayed, which is confusing by giving users a feeling that PG 7 is lost

- How I did it
Display valid PGs only

- How to verify it
Manually test and unit test.

- Previous command output (if the output of a command-line utility has changed)
       Port    PG0    PG1    PG2    PG3    PG4
-----------  -----  -----  -----  -----  -----
 Ethernet0      0      0      0      0      0
 Ethernet2      0      0      0      0      0
 Ethernet8      0      0      0      0      0
Ethernet10      0      0      0      0      0
Ethernet16      0      0      0      0      0
Ethernet18      0      0      0      0      0
Ethernet32      0      0      0      0      0

- New command output (if the output of a command-line utility has changed)
PG1 won't be displayed if it is not configured

       Port    PG0    PG3    PG4
-----------  -----  -----  -----
 Ethernet0      0      0      0
 Ethernet2      0      0      0
 Ethernet8      0      0      0
Ethernet10      0      0      0
Ethernet16      0      0      0
Ethernet18      0      0      0
Ethernet32      0      0      0

Signed-off-by: Stephen Sun <stephens@nvidia.com>
…in the techsupport dump (sonic-net#2572)

- What I did
Fixed a deletion flow for all secret files in the tech support dump.

- How I did it
Delete files by using the find and rm Linux utilities.

- How to verify it
Run the show_techsupport/test_techsupport_no_secret.py

Signed-off-by: Vadym Hlushko <vadymh@nvidia.com>
…tor when unable to fetch DEVICE_METADATA due to empty CONFIG_DB during initialization (sonic-net#2569) (sonic-net#2570)

- What I did
It is expected that db_migrator is not able to fetch DEVICE_METADATA when it is invoked before the CONFIG_DB is initialized. In this case, we should not use ERROR to log the message since it's not an error.
Change the severity to NOTICE

- How I did it
Change the severity.

- How to verify it
Manually test.

Signed-off-by: Stephen Sun <stephens@nvidia.com>

Signed-off-by: Stephen Sun <stephens@nvidia.com>
…grating packages (sonic-net#2573) (sonic-net#2575)

What I did
SONiC package migration has been failing due to the lack of DNS configuration for registries domain names.
I used /etc/resolv.conf from host OS when migrating.

Based on PR sonic-net#2573

How I did it
Copy /etc/resolv.conf into new image filesystem during migration, then, restore it back.

How to verify it
Run sonic-installer install.
…onic-net#2574)

- What I did
Preserve COPP table contents through DB migration. (Mellanox only)

- How I did it
Skipped deleting of COPP tables in DB migrator

- How to verify it
Observe COPP table contents are preserved right after reboot
…or (sonic-net#2176)

- What I did
Add sonic-delayed.target to sonic-application-extension .timer file generator
This change will complete sonic-net/sonic-buildimage#7846 of sonic-delayed.target addition.

- How I did it
N/A

- How to verify it
Make sure your App Ext is part of "WantedBy" sonic-delayed.target
- What I did
Reverted PRs because they caused the degradation that some files are missing in show techsupport archive.

- How I did it
Reverts the following 
e1c8243 [202205][generate_dump] Fix for a deletion flow for all secret files in the techsupport dump (sonic-net#2572)
f45dcfb [generate_dump] Optimize the execution time of 'show techsupport' CLI by paraller function execution (sonic-net#2565)
93172c4 [202205] [generate_dump] Optimize the execution time of the 'show techsupport' script to 5-10% by reducing calls to the 'tar append' operation (sonic-net#2562)
Signed-off-by: kannankvs <kannan_kvs@dell.com>

Signed-off-by: kannankvs <kannan_kvs@dell.com>
… voq statistics (sonic-net#2591)

* Enhanced queue stat to add an option to display voq statistics. When voq option is
  given look at COUNTERS_SYSTEM_PORT_NAME_MAP and COUNTERS_VOQ_NAME_MAP to derive
  the queue information to lookup. Added a modified header for voq statistics.

* Added a unit test for the new voq option.
…#2585)

What I did
Add linkprober category to story teller. It will reflect dualtor heartbeat events.

sign-off: Jing Zhang zhangjing@microsoft.com

How to verify it
Tested on dualtor device, was able to grep link prober state change events.
This is a PR against 202205 based on the following PR: sonic-net#2577
Due to an issue of fallback from to cold-boot when using upgrade with fast-reboot combined with FW upgrade a short term solution is to extend the timer.
An issue will be opened on this case with the full details, link will be added to the PR.
Long term solution of using fast-reboot finalizer replacing the timer is in work.

What I did
Extend the timer of STATE DB fast-reboot entry to 210 seconds.

How I did it
Modify the TTL of the entry set in STATE DB.

How to verify it
Verify the entry was preserved for 210 seconds.
…ER_DOM_THRESHOLD table (sonic-net#2535)

* EEPROM CLI support to dump output from TRANSCEIVER_DOM_THRESHOLD table

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Resolved test failures

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
#### What I did
Add bgpraw output to `show runningconfiguration all`
```
Requirements:
1. current `show runningconfig` will print all the ConfigDB in a json format, we need to add a new key-value into the json output "bgpraw" with a long string value
2. The long string value should be the output of `vtysh -c "show run"`. It is normally multiline string, may include special characters like \". Need to make sure the escaping properly
3. We do not need to insert the key-value into ConfigDB is not existing there
4. If ConfigDB already has the key-value, we do not need to override it by vtysh command output
5. Not break multi-asic use
```
#### How I did it
Generate bgpraw output then append it to `show runnningconfiguration all`'s output
#### How to verify it
Mannual test
#### Previous command output (if the output of a command-line utility has changed)
```
admin@vlab-01:~$ show run all
{
    "ACL_TABLE": {
......
    "WRED_PROFILE": {
        "AZURE_LOSSLESS": {
            "ecn": "ecn_all",
            "green_drop_probability": "5",
            "green_max_threshold": "2097152",
            "green_min_threshold": "1048576",
            "red_drop_probability": "5",
            "red_max_threshold": "2097152",
            "red_min_threshold": "1048576",
            "wred_green_enable": "true",
            "wred_red_enable": "true",
            "wred_yellow_enable": "true",
            "yellow_drop_probability": "5",
            "yellow_max_threshold": "2097152",
            "yellow_min_threshold": "1048576"
        }
    }
}
```
#### New command output (if the output of a command-line utility has changed)
```
admin@vlab-01:~$ show run all
{
    "ACL_TABLE": {
......
    "WRED_PROFILE": {
        "AZURE_LOSSLESS": {
            "ecn": "ecn_all",
            "green_drop_probability": "5",
            "green_max_threshold": "2097152",
            "green_min_threshold": "1048576",
            "red_drop_probability": "5",
            "red_max_threshold": "2097152",
            "red_min_threshold": "1048576",
            "wred_green_enable": "true",
            "wred_red_enable": "true",
            "wred_yellow_enable": "true",
            "yellow_drop_probability": "5",
            "yellow_max_threshold": "2097152",
            "yellow_min_threshold": "1048576"
        }
    },
    "bgpraw": "Building configuration...\n\nCurrent configuration......end\n"
}
```
What I did
sonic-net#2537
202205 branch doesn't have from sonic_py_common import multi_asic, which results in test failure and build error.
The only difference between this PR and original PR is just one line of import.

How I did it
How to verify it
Tested locally on 202205 build and pass the build process.
…ertisement interface when `radv` service is stopped (sonic-net#2622)

This PR is to add CLI support to enable or disable the feature to send out a good-bye packet when radv service is stopped on active-active dualtor devices.

sign-off: Jing Zhang zhangjing@microsoft.com
What I did
sonic-net#2537
sonic-net#2623
sonic-net#2628

202205 branch doesn't have from sonic_py_common import multi_asic, which results in test failure and build error.
The only difference between this PR and original PR is just one line of import.

How to verify it
Tested locally on 202205 build and pass the build process.
Test to make sure it pass GCU tests.
…check for internal links (sonic-net#2466)

Print reminder to check internal links on multi-asic platforms
Signed-off-by: Wenyi Zhang <wenyizhang@microsoft.com>
* show logging CLI support for logs stored in tmpfs

Signed-off-by: Mihir Patel <patelmi@microsoft.com>

* Fixed testcase failures

* Reverted unwanted change in a file

* Added testcase for syslog.1 in log.tmpfs directory

* mend

---------

Signed-off-by: Mihir Patel <patelmi@microsoft.com>
Signed-off-by: Zhixin Zhu <zhixzhu@cisco.com>
@linux-foundation-easycla
Copy link

CLA Not Signed

@wenyiz2021 wenyiz2021 closed this Jun 13, 2023
@wenyiz2021 wenyiz2021 deleted the portstat_202205 branch June 13, 2023 23:00
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.