[trim]: Add Packet Trimming Drop Counters CLI#20
Closed
Conversation
…_warning (sonic-net#3832) There is the case of rare situation of race condition when plugin script file is removed right before the stage of its load via cli (e.g. in case of dynamic removing with app extensions). This situation has no impact but generate additional error messages to syslog What I did Add separate processing ModuleNotFoundError with log_warning messages to avoid excess ERR printing How to verify it It happens very rarely in nature but you can just try to remove plugin script manually right before its loading stage. I used this changes on top of my commit for testing: diff --git a/utilities_common/util_base.py b/utilities_common/util_base.py index 95098b7..c808b0a 100644 --- a/utilities_common/util_base.py +++ b/utilities_common/util_base.py @@ -2,6 +2,8 @@ import os import pkgutil import importlib +import subprocess + from sonic_py_common import logger # Constants ==================================================================== @@ -11,6 +13,7 @@ PDDF_SUPPORT_FILE = '/usr/share/sonic/platform/pddf_support' log = logger.Logger() +plugin_path = "/usr/local/lib/python3.11/dist-packages/show/plugins/dhcp-relay.py" class UtilHelper(object): def __init__(self): @@ -28,11 +31,15 @@ class UtilHelper(object): continue log.log_debug('importing plugin: {}'.format(module_name)) try: + if module_name == "show.plugins.dhcp-relay": + subprocess.run(['mv', plugin_path, '/root/' ]) module = importlib.import_module(module_name) except ModuleNotFoundError as err: log.log_warning('failed to import plugin {}: {}'.format(module_name, err), also_print_to_console=True) + if module_name == "show.plugins.dhcp-relay": + subprocess.run(['mv', '/root/dhcp-relay.py', plugin_path ]) continue except Exception as err:
… in STATE DB and ASIC DB as mismatches (sonic-net#3990) What I did Changed vnet_route_check.py so that when a VNET route is missing in STATE DB, then it is treated as an inactive route. This means that when the script is called without -a and --all options, if a route in APP DB is missing in both STATE DB and ASIC DB, it will not be reported as a mismatch. How I did it Changed the logic in vnet_route_check.py. Added a new test and modified an existing test in vnet_route_check_test.py to verify the desired behavior. How to verify it Run the tests in vnet_route_check_test.py.
…ble (sonic-net#3884)" (sonic-net#3979) This reverts commit b106a82. This PR caused issue: sonic-net#3978 Need to revert it to unblock submodule advance for sonic-utilities.
e0aa175 to
604d80d
Compare
What I did Fixed "show interfaces status" output for interfaces with switchport mode configuration. How I did it Configured "switchport mode" is fetched from DB for all front panel ports and PortChannel interfaces. "Vlan" column in "show interface status" is displayed based on below considerations: If interface is part of PortChannel - display PortChannel interface name [present behavior] If "switchport mode" is configured on interface [Ethernet/PortChannel] - display configured mode [new behavior] If "switchport mode" is NOT configured on interface but part of a VLAN [Ethernet/PortChannel] - display as "trunk" [present behavior] If "switchport mode" is NOT configured on interface and NOT part of a VLAN [Ethernet/PortChannel] - display as "routed" [present behavior] How to verify it Configure "switchport mode" for an interface/portchannel and verify the output in below show commands show interfaces switchport status show interfaces status Previous command output (if the output of a command-line utility has changed) Previously it was always displaying as trunk even if interface is configured as access root@sonic:~# config switchport mode access Ethernet0 Ethernet0 switched to access mode root@sonic:~# show interfaces switchport status | grep Ethernet0 Ethernet0 access root@sonic:~# root@sonic:~# show interfaces status | grep Ethernet0 Ethernet0 2304,2305,2306,2307 100G 9100 N/A etp0 trunk up up QSFP28 or later N/A New command output (if the output of a command-line utility has changed) root@sonic:~# config switchport mode access Ethernet0 Ethernet0 switched to access mode root@sonic:~# show interfaces switchport status | grep Ethernet0 Ethernet0 access root@sonic:~# root@sonic:~# show interfaces status | grep Ethernet0 Ethernet0 2304,2305,2306,2307 100G 9100 N/A etp0 access up up QSFP28 or later N/A closes sonic-net#3787
What I did Implemented CLI utilities for MSTP (Multiple Spanning Tree Protocol) in SONiC How I did it Introduced new configuration and show commands to manage MSTP at the global, region, instance, and interface levels. Updated the configuration database schema to support MSTP, including new tables and additions to the existing STP_GLOBAL_TABLE.
…t#3988) Why I did it When running the test_fwutil_update_current test in https://github.com/sonic-net/sonic-mgmt/blob/master/tests/platform_tests/fwutil/test_fwutil.py we encounter the following issue when we run the command admin@sonic:$ sudo fwutil update chassis component ONIE fw -y Error: Failed to parse "platform_components.json": invalid platform schema: "module" key hasn't been found. Aborting... Aborted! This is because platform_components.json for smartswitch doesn't have module key in it and this should be ignored for smartswitch. What I did Avoid any modular chassis operations on smart-switch. How I did it Added a check to verify the device is not a smart switch before treating it as a modular chassis.
What I did Rename the variable tag to docker_image_reference since it can also hold image digest. How I did it Change the variable name to match the name agreed on sonic-net/sonic-buildimage#22911 How to verify it Install App Extension
…ion is lower than 5.0 (sonic-net#3938)
* Add queuestat changes for aggregate VOQ counters
* Fix: show interface transceiver info Ethernet0 command fails for CMIS SFP * Fix variable name error. * Return DOM for flat memory modules if it's available. * Update unit tests. * Update unit tests. * Update unit tests. * Update unit tests.
* Add history option to pfcstat cli * Unit tests for pfcstat history cli Please note the usage of `# flake8: noqa: E501` in assert_show_output.py to account for the length of show command output strings. * Add pfc counters history flag to utilities documentation
… chassisd/sonic-utiltiies changes for consecutive admin state changes (sonic-net#3984) * Fixed for #23205 * Addressed a review comment ModuleBase.MODULE_STATUS_EMPTY * added required import
* Add pfc stat history options to PFCWD CLI * Unit tests for PFCWD pfc history cli Includes modifications made to pass pre-commit (fixing import *). * Add pfc-stat-history command and flag for PFCWD to docs
…r all CMIS transceivers (sonic-net#4010) * sfputil and sfpshow eeprom and DOM CLI enhancement to display data for all CMIS transceivers Signed-off-by: Mihir Patel <patelmi@microsoft.com> * Created is_transceiver_cmis function * Fixed precommit failure * Added blank line before is_transceiver_cmis * Addressed PR comments --------- Signed-off-by: Mihir Patel <patelmi@microsoft.com>
What I did Added json output supoort for intfutil -c autoneg -j intfutil -c fec -j intfutil -c status -j intfutil -c description -j intfutil -c tpid -j intfutil -c link_training -j
9c182d8 to
6469494
Compare
…c-net#3998)" (sonic-net#4024) Reverts sonic-net#3998 to fix build issue. Details in sonic-net#3998
…ermark (sonic-net#3875) What I did Added json output supoort for admin@sonic:~$ show queue watermark unicast --help Usage: show queue watermark unicast [OPTIONS] Show user WM for unicast queues Options: -j, --json Display1 output in JSON format [default: False] -?, -h, --help Show this message and exit. admin@sonic:~$ show queue watermark multicast --help Usage: show queue watermark multicast [OPTIONS] Show user WM for multicast queues Options: -j, --json Display1 output in JSON format [default: False] -?, -h, --help Show this message and exit.
…rs (sonic-net#4007) What I did Mux neighbors now use prefix-based routes based on changes from the following PR: sonic-net/sonic-swss#3722 Presence of route prefix for neighbors does not mean tunnel-route use anymore. Show command now uses nexthop type to distinguish between tunnel and normal neighbor route. How to verify it Verified output on hardware. Signed-off-by: Manas Kumar Mandal <manamand@cisco.com>
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
6469494 to
e9f23d8
Compare
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
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)