Fix show interface status display of Interface to Port-channel mapping.#1026
Fix show interface status display of Interface to Port-channel mapping.#1026abdosi wants to merge 113 commits intosonic-net:masterfrom
Conversation
…ts (sonic-net#772) * [fwutil]: initial version. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: Fix UI: enable progressbar render finalizer. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: integrate utility with SONiC CLI. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: update CLI command reference documentation. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: Revisit CLI architecture: avoid direct imports. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: Fix review comments: refactor CLI command reference. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: Fix review comments: update CLI documentation. Signed-off-by: Nazarii Hnydyn <[email protected]>
…onic-net#815) This is possible if some of docker are not built then corresponding service file will not be present
Signed-off-by: Akhilesh Samineni <[email protected]>
…onic-net#819) * [reboot] make sure the reboot happens even if platform reboot failed Platform reboot tool could fail if the platform driver didn't load properly. In this case, a reboot is required to recover the device. We need to make sure the reboot tool is robust. Signed-off-by: Ying Xie <[email protected]> * Rewording * add log message
* add support for MCLAG Signed-off-by: shine.chen <[email protected]> * add warm-reboot support for ICCPd Signed-off-by: shine.chen <[email protected]> * ensure iccpd is there before stop iccpd Signed-off-by: shine.chen <[email protected]> * fix service function * remove unused comment * refactor code according to feature management mechanism Signed-off-by: shine.chen <[email protected]>
…b-cli/sonic-db-dump (sonic-net#810) * [MultiDB] sonic-utilities - replace redis-cli/redis-dump with sonic-db-cli/sonic-db-dump * only accept upper and underscore to prevent injection * quotation on db_name
* Add pfcwd utility to the config/show CLI Signed-off-by: Andriy Moroz <[email protected]> * Add some more commands Signed-off-by: Andriy Moroz <[email protected]> * [doc] Add start_default description Signed-off-by: Andriy Moroz <[email protected]>
…c-net#821) Signed-off-by: Nazarii Hnydyn <[email protected]>
* [Mellanox] add document for thermal control related cli * Update review comments thermal zones -> thermal sensors * Make example better
…c-net#839) This is not an issue with normal and correct configuration. The issue was exposed when there is an incorrect configuration, e.g. contain wrong port names. These wrong port names will still get populated to the app_db but will not have speed associated. Lack of speed entry will cause "show interface status" to throw exception. Signed-off-by: Ying Xie <[email protected]>
…net#843) add stoping/restarting services messages in syslog Signed-off-by: Guohan Lu <[email protected]>
Signed-off-by: Antony Rheneus <[email protected]>
…platform (sonic-net#833) * do DB migration for buffer pool size change with new SDK version * fix review comments enhace migration fail case * make migrator can work with warm reboot case * ehnahce the logic to cover more corner case simplify the way to generate new buffer configuration. * remove code to get info from config_db.json since it's not necessary 3800 platform need special buffer configuration
Starting click 7.0. The default behavior of a command with under scores will be replace with dashes. this is to address the above default behavior change, so that the command remains the same. more details can be found: pallets/click#1123
…et#835) For some platforms which implement the eeprom plugin by inheriting from TlvInfoDecoder, the line t.getattr('read_eeprom_db', None) == None: results in an error: AttributeError: 'board' object has no attribute 'getattr' The cause for that is that TlvInfoDecoder inherits from object, and looks like for object and derived classes there is no __getattr__. Signed-off-by: Mykola Faryma <[email protected]>
After the change in master branch updating SAI from 3.5.3.1m-25 to 3.7.3.2, we always found kernel panic after running fast-reboot command in testing SONiC with traffic. In the up path of fast-reboot, we can find warning messages like "unhandled irq 16 error" before kernel panic, which implies that some components are not properly closed in the down path. This fix will unload certain kernel modules by stopping opennsl before fast-reboot, which is suggested by BRCM. Note that another part of the fix is to add 'ExecStop=-/etc/init.d/opennsl-modules stop' to sonic-buildimage:platform/broadcom/saibcm-modules/systemd/opennsl-modules.service, which will be included in another pull request.
the return value of _get_optional_services() must be iterable This bug is imported from PR sonic-net#453 Co-authored-by: shine.chen <[email protected]>
…nic-net#848) This reverts commit f1c79d5.
This reverts commit 8aea564.
…ic-net#825) * [fwutil]: Use overlay driver when mounting next image filesystem. Signed-off-by: Nazarii Hnydyn <[email protected]> * [fwutil]: Update command reference. Signed-off-by: Nazarii Hnydyn <[email protected]>
Signed-off-by: Shlomi Bitton <[email protected]>
Signed-off-by: Nazarii Hnydyn <[email protected]>
…nic-net#858) Co-authored-by: Bing Sun <[email protected]>
… and thermal status (sonic-net#836) * [thermal fix] use natural sort for fan status and thermal status * [thermal fix] set fan status to N/A when fan is removed * Adjust header name for show platform temperature output
…lds (sonic-net#958) Change the following key names: - hardwarerev -> hardware_rev - serialnum -> serial - manufacturename -> manufacturer - modelname -> model - Connector -> connector Depends on: - sonic-net/sonic-platform-common#97 - sonic-net/sonic-platform-daemons#62
) **- What I did** Implemented show interface breakout sub-command to show the port capability and the current breakout mode. Available commands are mentioned below. ``` show interfaces breakout --help show interfaces breakout current-mode ``` **- How I did it** using platform.json, hwsku.json and config-db BREAKOUT_CFG table. **- How to verify it** ``` admin@lnos-x1-a-fab01:~$ show interfaces breakout --help Usage: show interfaces breakout [OPTIONS] COMMAND [ARGS]... Show interface breakout Options: -?, -h, --help Show this message and exit. Commands: current-mode Show interface breakout current-mode ``` ``` admin@lnos-x1-a-fab01:~$ show interfaces breakout { "Ethernet0": { "index": "1,1,1,1", "default_brkout_mode": "1x100G[40G]", "child ports": "Ethernet0", "child port speed": "100G", "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]", "Current Breakout Mode": "1x100G[40G]", "lanes": "65,66,67,68", "alias_at_lanes": "Eth1/1, Eth1/2, Eth1/3, Eth1/4" }, "Ethernet4": { "index": "2,2,2,2", "default_brkout_mode": "1x100G[40G]", "child ports": "Ethernet4,Ethernet5,Ethernet6,Ethernet7", "child port speed": "25G,10G,25G,25G", "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]", "Current Breakout Mode": "4x25G", "lanes": "69,70,71,72", "alias_at_lanes": "Eth2/1, Eth2/2, Eth2/3, Eth2/4" }, "Ethernet8": { "index": "3,3,3,3", "default_brkout_mode": "1x100G[40G]", "child ports": "Ethernet8", "child port speed": "100G", "breakout_modes": "1x100G[40G],2x50G,4x25G[10G]", "Current Breakout Mode": "1x100G[40G]", "lanes": "73,74,75,76", "alias_at_lanes": "Eth3/1, Eth3/2, Eth3/3, Eth3/4" },... continue } ``` ``` admin@lnos-x1-a-fab01:~$ show interfaces breakout current-mode Ethernet0 +-------------+-------------------------+ | Interface | Current Breakout Mode | +=============+=========================+ | Ethernet0 | 4x25G[10G] | +-------------+-------------------------+ ``` ``` admin@lnos-x1-a-fab01:~$ show interfaces breakout current-mode +-------------+-------------------------+ | Interface | Current Breakout Mode | +=============+=========================+ | Ethernet0 | 4x25G[10G] | +-------------+-------------------------+ | Ethernet4 | 4x25G[10G] | +-------------+-------------------------+ | Ethernet8 | 4x25G[10G] | +-------------+-------------------------+ ``` Signed-off-by: Sangita Maity <[email protected]>
Add a new Bootloader abstraction. This makes it easier to add bootloader specific behavior while keeping the main logic identical. It is also a step that will ease the introduction of secureboot which relies on bootloader specific behaviors. Shuffle code around to get rid of the hacky if/else all over the place. There are now 3 bootloader classes - AbootBootloader - GrubBootloader - UbootBootloader There was almost no logic change in any of the implementations. Only the AbootBootloader saw some small improvements. More will follow in subsequent changes.
…c-net#965) If FEATURE table did not exist,` config load/reload/reload_minigraph` commands would crash similar to the following: ``` Executing reset-failed of service nat... Executing reset-failed of service sflow... Traceback (most recent call last): File "/usr/bin/config", line 12, in <module> sys.exit(config()) File "/usr/lib/python2.7/dist-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/usr/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python2.7/dist-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python2.7/dist-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/usr/lib/python2.7/dist-packages/config/main.py", line 862, in reload _restart_services() File "/usr/lib/python2.7/dist-packages/config/main.py", line 585, in _restart_services disable_services = _get_disabled_services_list() File "/usr/lib/python2.7/dist-packages/config/main.py", line 518, in _get_disabled_services_list if status == "disabled": UnboundLocalError: local variable 'status' referenced before assignment ```
Parenthesize multiple exception types. Otherwise Python2 will incorrectly interpret the last exception type as the target.
* Suppport to verify aboot swi image for secure boot * Simplify the code * Fix not return value bug * Add m2crypto to setup.py * Change to only verify the image signed by a correct certificate
* Append mask if user has not provided one
* Add support for port mirroring CLIs Signed-off-by: Rupesh Kumar <[email protected]>
…d ports (sonic-net#765) Provided a new ConfigMgmt class for - Config Validation - Adding ports - Deleting ports Signed-off-by: Praveen Chaudhary [email protected]
* Add watchdogutil to control the hw watchdog * fix LGTM * Fixed based on review comments * replace the is_armed() and get_remaining_time to status() subcommand * syntax error * Add more info to the output * re-format of output * remove spaces * change the version number of watchdogutil * Change the output parsing for the watchdog arm case * typo * fix more review comments
…sonic-clear nat statistics" command (sonic-net#892) Signed-off-by: Akhilesh Samineni <[email protected]>
…mands (sonic-net#917) * Improvements to the config reload/load_minigraph commands in Multi NPU platforms by parallelizing with threads.
VLAN_INTERFACE section in Config_db may contain entries with no CIDR. This fix skip those entries. signed-off-by: Tamer Ahmed <[email protected]>
Port-Channel mapping information from APP DB instead of Config DB. Reason was when we add/remove memeber from Port-Channel using command teamdctl (eg: teamdctl PortChannel0002 port remove Ethernet0) show interface status does not get updated and provide worng information. Signed-off-by: Abhishek Dosi <[email protected]>
|
@abdosi, I think we should not use teamdctl command but "config portchannel member del <portchannel_name> <port_name>". "teamdctl" would have been used as legacy when the config command was not available. |
@prsunny this change is compatible with config command also. I feel app db is better since show interface port-channel also gets information from app db and that way both command show interface status and port-channel will be consistent. |
Not really, "show int port-channel" shows the current state of members from app_db. But the config state (from config_db) is now only in "show int status". Basically that shows the user that, the particular interface is bind to portchannel in configuration. Based on offline discussion with @prsunny this change is not correct and we should use config port-channel command in test case. Based on this will close this PR and have raised separate on sonic-mgmt to update test case : PR# sonic-net/sonic-mgmt#2021 |
|
As mentioned in above comments closing this PR. |
- What I did
Fixed show interface status to get Interface to
Port-Channel mapping information from APP DB instead of Config DB.
Reason was when we add/remove memeber from Port-Channel using command
teamdctl (eg: teamdctl PortChannel0002 port remove Ethernet0) show
interface status does not get updated and provide wrong information.
Some of ansible/pytest (eg: ansible/roles/test/tasks/arpall.yml )
uses teamdctl command to add/remove interface from port-channel
so without this change debugging becomes difficult as information is not valid.
- How I did it
Updated to get information from APP_DB instead of CONFIG_DB
- How to verify it
Manual Verification:
a) Initial Display:
admin@str-s6000-on-2:/$ show interface status
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC
b) Now Remove Ethernet from Port channel
admin@str-s6000-on-2:/$ teamdctl PortChannel0002 port remove Ethernet0
Before Fix:
c) Display again (No change ) Same as Initial Display
admin@str-s6000-on-2:/$ show interface status
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC
After Fix:
admin@str-s6000-on-2:/$ show interface status
Interface Lanes Speed MTU Alias Vlan Oper Admin Type Asym PFC