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

[Mellanox] Add SDK dump with new SAI implementation #6

Closed
wants to merge 64 commits into from

Conversation

DavidZagury
Copy link
Owner

What I did

Add SDK dump output into techsupport in the generate_dump script.

How I did it

Add a step to copy SDK dump output into techsupport in the generate_dump script.

How to verify it

Simulate SDK event and check that dump is copied into the techsupport results.

This PR is only valid after this PR is merged - DavidZagury/sonic-buildimage#8

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)

dmytroxshevchuk and others added 30 commits February 23, 2021 23:12
**- What I did**
Fixed `show interface breakout` command

**- How I did it**

**- How to verify it**
From command line type `show interface breakout`

**- Previous command output (if the output of a command-line utility has changed)**
```
Traceback (most recent call last):
  File "/usr/local/bin/show", line 10, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1114, in invoke
    return Command.invoke(self, ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/show/interfaces/__init__.py", line 135, in breakout
    config_db = ConfigDBConnector()
NameError: global name 'ConfigDBConnector' is not defined
```
**- New command output (if the output of a command-line utility has changed)**
Related from DPB config.
e.g.
```
{
    "Ethernet0": {
        "index": "0,0,0,0",
        "default_brkout_mode": "1x100G[40G]",
        "child ports": "Ethernet0",
        "breakout_modes": "1x100G[40G],2x50G,4x25G[10G],2x25G(2)+1x50G(2),1x50G(2)+2x25G(2)",
        "child port speeds": "100G",
        "Current Breakout Mode": "1x100G[40G]",
        "lanes": "25,26,27,28",
        "alias_at_lanes": "Ethernet0/0,Ethernet0/1,Ethernet0/2,Ethernet0/3"
    }
}
```
* Replacing using 'get_all' with 'exists' in port state checking procedure inside bind function to avoid freezing in the while loop, what caused by absence of related record in STATE_DB.

Signed-off-by: Maksym Belei <[email protected]>
…nic-net#1348)

**- What I did**
Support shared headroom pool on top of dynamic buffer calculation.

Signed-off-by: Stephen Sun <[email protected]>

**- How I did it**

1. Introduce new commands for shared headroom pool configuration.
   - config buffer shared-headroom-pool over-subscribe-ratio
   - config buffer shared-headroom-pool size
   Shared headroom pool can be enabled by configuring either over-subscribe-ratio or size.
   In case both configured, the size will take effect.
   The following existing commands has been updated accordingly:
   - config buffer profile
2. Update db_migrator:
   - Port version 1.0.5 from 201911 branch
   - Port the main logic of Mellanox buffer migrator from 201911
   - Add unit test infra for Mellanox buffer migrator
3. Command "config qos clear/reload" has been updated with tables for dynamic buffer calculation cleared as well

**- How to verify it**
Run unit test and regression test.
…er in counterpoll utility (sonic-net#1355)

Signed-off-by: Andriy Yurkiv <[email protected]>

depends on:
sonic-net/sonic-buildimage#6444
sonic-net/sonic-swss#1600

- What I did
Added new option for "counterpoll" utility

- How I did it
Enhance counterpoll utility for SAI_INGRESS_PRIORITY_GROUP_STAT_DROPPED_PACKETS
Add new CLI command and extend the show command.

- How to verify it
To test it use QoS test. run the pfcxontest and Pfcxofftest, drop can be triggered in either of the test.
It runs in ptf32 topo and requires RPC image.

admin@arc-switch1041:~$ counterpoll pg-drop enable  --> to enable the new counter
admin@arc-switch1041:~$ counterpoll show  --> check new INGRESS_PG_STAT_DROP counter status
Clean up sfpshow utility

- Reword header docstring and comments
- Unify formatting
- Rename variables and constants
- Use `+=` for string concatenation to reduce line length
- Pass through `autopep8 --max-line-length 120`
sonic-net#1416)

- Enhance `psushow -s` output, adding columns to display PSU Model, Serial, Voltage, Current and Power
- Add `-j/--json` option to display output in JSON format
- Update mock State DB PSU_INFO table to provide values which we can ensure floats are padded to two decimal places in tabular display mode
- Add `--json` option to `show platform psustatus` which in turn adds the `-j` flag to the underlying `psushow` call
- Add unit tests for `psushow` in psushow_test.py
- Add more unit tests for `show platform psustatus` and move to show_platform_test.py
…o this VLAN. (sonic-net#1420)

- What I did
In vlan.py , function del_vlan added validation if there is no members assigned to this VLAN. If there are members - the execution of this command is failed with error on the screen.

- How I did it
Added validation of the VLAN_MEMBER_CFG_TABLE with the key VLAN_ID. If there are entries with this VLAN_ID - print error:
VLAN ID {} can not be removed. First remove all members assigned to this VLAN.
User should remove all members assigned to this VLAN, and after that he can delete vlan.

- How to verify it
sudo config vlan add 200
sudo config vlan member add 200 Ethernet0
sudo config vlan del 200
In this case - you will see error as there are members assigned to this VLAN

sudo config vlan member del 200 Ethernet0
sudo config vlan del 200
Will pass.

Signed-off-by: allas <[email protected]>
#### What I did
The S6000 devices, the cold reboot is abrupt and it is likely to cause issues which will cause the device to land into EFI shell. Hence the platform reboot will happen after graceful unmount of all the filesystems as in S6100.

#### How I did it
In reboot script, if platform-specific reboot cause update script exists, run it
- What I did
Support new Mellanox system SN4600

- How I did it
Add the system name to the buffer migration script even if the system is first added
The key used is as read from APPL-DB, hence use it as such to get the value,
to help get the interfce name, so it can be used for filtering out.
…-net#1465)

Use the fast-reboot-dump and filter_fdb_entries scripts to cache the current ARP and FDB tables in /host/config-reload. Also create a file in the same directory to indicate to SWSS that it should restore from the cache.

Signed-off-by: Lawrence Lee <[email protected]>
…t#1469)

- Add ICMP and VLAN fields
- Add new unit test cases

Signed-off-by: Danny Allen <[email protected]>
…0-D40C8S8 (sonic-net#1470)

**- What I did**

Change mellanox buffer migrator for new SKU Mellanox-SN2700-D40C8S8

**- How I did it**

New SKU Mellanox-SN2700-D40C8S8 will reuse buffer configuration of Mellanox-SN2700-D48C8

**- How to verify it**

Run sonic-mgmt qos test and pass
Summary:
This PR provides the support for adding CLI commands for retrieving cable vendor name and part number information of the muxcable.
In particular these Cli commands are supported:
show muxcable cableinfo <port>

Approach
added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py

What is the motivation for this PR?
To add the support for Cli for muxcable to be utilized for retrieving cable vendor name and part number information of the muxcable.

Signed-off-by: vaibhav-dahiya <[email protected]>
…for hwmode functionality to toggle mux, check mux direction for Y cable (sonic-net#1491)

Signed-off-by: vaibhav-dahiya <[email protected]>
…how/config muxcable return codes; (sonic-net#1494)

his PR fixes the

show mux hwmode muxdirection
config mux hwmode state
cli commands to correctly use the model values for matching the vendor model value present in TRANSCEIVER_INFO table
in state DB.

This PR also supports the fix for return codes for

show mux
config mux 
commands to return 0 if the command executes correctly.

What I did
fix for show/config muxcable hwmode model value; fix show/config muxcable return codes;

Signed-off-by: vaibhav-dahiya <[email protected]>
…eboot (sonic-net#1460)

Check if any warm restart flag is set when issuing a warm-reboot. This check avoids starting a warm reboot while another warm restart is in progress. In the scenario where a warm reboot is issued with another warm restart in progress, the warm restart flag may be reset and part of the components have a risk of doing cold reboot.
#### What I did
Modified pre-check for file `/host/warmboot/issu_bank.txt` in `warm-reboot` script.
Added automated recovery of  `/host/warmboot/issu_bank.txt`

#### How I did it
Modified the `warm-reboot` script.

#### How to verify it
Need to somehow corrupt the `/host/warmboot/issu_bank.txt` (list below) and then run the `warm-reboot` command.
For testing I have modified the `warm-reboot` script - added corruption command before `check_issu_bank_file` function call.

1. Remove `issu_bank.txt`
2. Clear `issu_bank.txt`
3. Change characters count in `issu_bank.txt`
4. Write invalid content into `issu_bank.txt`

#### Previous command output (if the output of a command-line utility has changed)
```
root@arc-switch1041:~# warm-reboot
(/host/warmboot/issu_bank.txt) does NOT exist or empty ...
To recover (/host/warmboot/issu_bank.txt) file, do the following:
$ docker exec -it syncd sx_api_dbg_generate_dump.py
$ docker exec -it syncd cat /tmp/sdkdump | grep 'ISSU Bank'
Command above will print the VALUE of ISSU BANK - 0 or 1, use this VALUE in the next command
$ printf VALUE > /host/warmboot/issu_bank.txt
```

#### New command output (if the output of a command-line utility has changed)
```
root@arc-switch1041:~# warm-reboot
(/host/warmboot/issu_bank.txt) does NOT exist or empty ...
Recovering the (/host/warmboot/issu_bank.txt) file
```
Cleanup review to remove Arista specific logic from generate_dump.
We now implement the vendor specific hw-management-generate-dump.sh hook which achieves the same purpose.

Signed-off-by: Samuel Angebault <[email protected]>
)

Added a check for empty key before checking WARM_RESTART_ENABLE_TABLE
…onic-net#1368)

* Skip records of FDB entries, which are linked to default Vlan 1,
  to prevent exception throwing while performing
  command 'show mac' or 'fdbshow'.

Signed-off-by: Maksym Belei <[email protected]>
* What I did
Added new CLI commands to view and clear PG dropped packet statistics.
Added the new CLI commands to the command reference guide.

* How I did it
I have added script which can generate table that shows current PG dropped packet statistic and also can clean it
Clean and Show is implemented with using serialized stats from previous execution.
To calculate current stats we do next step:
- take old serialized data (if no 'clear' executed all serialized data is 0)
- take current stat
- show diff between current and old

* How to verify it
run
show priority-group drop counters - show current stat
sonic-clear priority-group drop counters - clear current stat

* New command output (if the output of a command-line utility has changed)
show priority-group drop counters
Ingress PG dropped packets:
     Port    PG0    PG1    PG2    PG3    PG4    PG5    PG6    PG7
---------  -----  -----  -----  -----  -----  -----  -----  -----
Ethernet0    800    801    802    803    804    805    806    807
Ethernet4    400    401    402    403    404    405    406    407
Ethernet8    100    101    102    103    104    105    106    107
...
sonic-clear priority-group drop counters
Cleared PG drop counters

Co-authored-by: ayurkiv <[email protected]>
…ervices (sonic-net#1499)

Signed-off-by: Yong Zhao [email protected]

What I did
When we ran the commands sudo config reload or sudo config load_minigraph, the containers swss, snmp, lldp, teamd, syncd, snmp, bgp, radv, pmon, dhcp_relay, telemetry, mgmt-framework and restapi would be stopped and then restarted. The script container_checker ran by Monit will generate false alerting messages into syslog to indicate some containers were not running during such stopping and restarting process. So this PR aims to prevent Monit from generating false alarm messages.

How I did it
Before stopping services, we disable Monit to monitor the running status of containers. After restarting services, we enable Monit to monitor the running status of containers again.

How to verify it
I deliberately reduce the monitoring interval of Monit from 60 seconds to 10 seconds to ensure the alerting messages from the script container_checker was generated during sudo config reload and sudo config load_minigraph. After this change was added into _stop_services() and _restart_services() , I checked that the alerting messages from container_checker did not appear in the syslog.

I verified this change on the virtual switch.
If the script detects it is running on a dual ToR system, stop the mux container before shutting down syncd

This is necessary to prevent some links from flapping when the standby ToR is rebooted - when reboot stop syncd, the linkmgr will stop receiving heartbeats and will then tell the mux to switchover. However, since the device is rebooting, no heartbeats will be sent out. The peer ToR will see this absence of heartbeats and tell the mux to switch back to itself (the peer ToR), causing the flap.

By stopping the mux container before shutting down syncd, we prevent the rebooting ToR from switching the mux.

Signed-off-by: Lawrence Lee <[email protected]>
File show/vlan.py, function config(db) was modified to fill the table with VLAN even without members.

Signed-off-by: allas <[email protected]>
…1478)

Pass missed argument to function "appl_db_portchannel_status_get" in "intfutil" script to provide correct information in "Vlan" column of command "show int status" for LAG interfaces.

- What I did
Fixed status of LAG interfaces in Vlan column. LAG interfaces, configured as a Vlan member, should be seen as trunk interface.

- How I did it
Missed argument "self.combined_int_to_vlan_po_dict" passed to function "appl_db_portchannel_status_get"
in "intfutil" script.

- How to verify it
admin@sonic:~$ show int status | grep PortChannel0011

Signed-off-by: Maksym Belei <[email protected]>
renukamanavalan and others added 28 commits March 31, 2021 08:57
Log callstack on timeout.

What I did
Add self timeout and crash on timeout.
Before crash log the error and call stack.

How I did it
Add a signal based alarm and the handler to print error & call stack.

How to verify it
Artificially introduce a sleep (> TIMEOUT, which is 2mins) in the script in any function that is in the call path.
Invoke the script. Watch it crash and note the error & stack logged in syslog.
Fix for hanging:
Enforce max len on string to be printed to stdout.
With huge mismatch, the message to print can be too long to hang python print statement.

Lower logging level:
The log for "details of route mismatch" is lowered to WARNING. The caller of the route_check may log error, as it sees it fit. The failure of route_check is indicated to caller via exit code.

How to verify it
Simulate error (route-mismatch), and verify
a) message len does not exceed set MAX
b) log level is WARNING
- What I did
Fixed next image mount

- How I did it
Removed lstrip

- How to verify it
root@sonic:/home/admin# fwutil update chassis component <component_name> fw -i next

Signed-off-by: Nazarii Hnydyn <[email protected]>
…#1538)

As introduced by the kernel doc, we do not need the line 20 in reboot script since it only influenced the capability to reboot the Linux kernel by hitting the combo magic key of keyboard.

Signed-off-by: Yong Zhao <[email protected]>
…onic-net#1543)

Signed-off-by: Yong Zhao [email protected]

What I did
Nightly test found a failure when we ran the command sudo config reload/load_minigraph, The error message is:

admin@str-a7050-acs-1:~$ sudo config reload -y
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Resetting failed status on bgp.service
Resetting failed status on caclmgrd.service
Resetting failed status on dhcp_relay.service
Resetting failed status on hostcfgd.service
Resetting failed status on hostname-config.service
Resetting failed status on interfaces-config.service
Resetting failed status on lldp.service
Resetting failed status on ntp-config.service
Resetting failed status on pmon.service
Resetting failed status on procdockerstatsd.service
Resetting failed status on radv.service
Resetting failed status on rsyslog-config.service
Resetting failed status on swss.service
Resetting failed status on syncd.service
Resetting failed status on teamd.service
Resetting failed status on telemetry.timer
Restarting SONiC target ...
Reloading Monit configuration ...
Reinitializing monit daemon
Enabling container monitoring ...
Unix socket /var/run/monit.sock connection error -- No such file or directory
The root reason is that there exists an implicit race condition between the command sudo monit reload at line 701 and
the command sudo monit monitor container_checker at line 706. Both commands need access the monit.sock socket file
under the directory /var/run/.

Specifically the sudo monit reload at line 701 will re-initialize the Monit daemon, delete old monit.sock file and then create a new one. During this re-initializing process, the command sudo monit status can always execute successfully at line 704 before the old monit.sock file was deleted, but the command sudo monit monitor container_checker at line 706 will only succeed if the new monit.sock was created, otherwise it will fail and raise this error message.

How I did it
I changed the sequence between the operation to reload Monit configuration and the operation to enable monitoring container_checker.

How to verify it
I verified this change on DuT str-a7050-acs-1 by running the command sudo config reload/load_minigraph -y to make sure the error was not raised again.

Previous command output (if the output of a command-line utility has changed)
admin@str-a7050-acs-1:~$ sudo config reload -y
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Resetting failed status on bgp.service
Resetting failed status on caclmgrd.service
Resetting failed status on dhcp_relay.service
Resetting failed status on hostcfgd.service
Resetting failed status on hostname-config.service
Resetting failed status on interfaces-config.service
Resetting failed status on lldp.service
Resetting failed status on ntp-config.service
Resetting failed status on pmon.service
Resetting failed status on procdockerstatsd.service
Resetting failed status on radv.service
Resetting failed status on rsyslog-config.service
Resetting failed status on swss.service
Resetting failed status on syncd.service
Resetting failed status on teamd.service
Resetting failed status on telemetry.timer
Restarting SONiC target ...
Reloading Monit configuration ...
Reinitializing monit daemon
Enabling container monitoring ...
New command output (if the output of a command-line utility has changed)
admin@str-a7050-acs-1:~$ sudo config reload -y
Disabling container monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Resetting failed status on bgp.service
Resetting failed status on caclmgrd.service
Resetting failed status on dhcp_relay.service
Resetting failed status on hostcfgd.service
Resetting failed status on hostname-config.service
Resetting failed status on interfaces-config.service
Resetting failed status on lldp.service
Resetting failed status on ntp-config.service
Resetting failed status on pmon.service
Resetting failed status on procdockerstatsd.service
Resetting failed status on radv.service
Resetting failed status on rsyslog-config.service
Resetting failed status on swss.service
Resetting failed status on syncd.service
Resetting failed status on teamd.service
Resetting failed status on telemetry.timer
Restarting SONiC target ...
Enabling container monitoring ...
Reloading Monit configuration ...
Reinitializing monit daemon
…#1544)

Optimize/Reduce the time taken by show interface * and show ip bgp * commands on Multi-asic platforms.
…sonic-net#1393)

Add PortChannels to the list of interfaces (port_id_2_iface) to support FDB dump for PortChannel in a VLAN group.

Fix sonic-net/sonic-buildimage#4793

- How I did it

- Get LAG ID from the DB.
- Find the LAG name from APP DB.
- Add it to the list of 'port_id_2_iface' to be used.

- How to verify it
Reproduce the issue mentioned on this PR and try to run fast-reboot with this fix.

- Previous command output (if the output of a command-line utility has changed)
Traceback:
src_ifs = {map_mac_ip_per_vlan[vlan_name][dst_mac] for vlan_name, dst_mac, _ in arp_entries}
KeyError: 'b8:59:9f:a8:e2:00'

Signed-off-by: Shlomi Bitton <[email protected]>
…1546)

#### What I did
This PR sonic-net#1393 merged after PR: sonic-net#1392
This caused the first PR to be not aligned with SonicV2Connector change.
This PR motivation is to fix it.
As of Python 3, `mock` is part of `unittest` in the Python standard library. Since sonic-utilities is now Python 3-only, we should import it this way everywhere.
…nic-net#1546)" (sonic-net#1561)

- What I did
It seems like this change is not backported to 202012: sonic-net#1392
So this PR sonic-net#1546 Is not required on 202012 branch.
It was cherry-picked to 202012 and now the fast-reboot-dump script is broken.

- How I did it
Revert the commit.

- How to verify it
Run fast-reboot on 202012 branch.
…#1528) (sonic-net#1558)

* [show][config] cli support for firmware upgrade on Y-Cable (sonic-net#1528)

Summary:
This PR provides the support for adding CLI commands for activatie, download, upgrade firmware on the Y-cable
In particular these Cli commands are supported:
sudo config muxcable firmware download Ethernet0
sudo config muxcable firmware rollback Ethernet0
sudo config muxcable firmware download ~/AEC_WYOMING_B52Yb0_MS_0.6_20201218.bin Ethernet0

Signed-off-by: vaibhav-dahiya [email protected]

What I did
Added the support for firmware upgrade CLI on Y cable

How I did it
added the changes in sonic-utilities/show and sonic-utilities/config by changing the muxcable.py

Signed-off-by: vaibhav-dahiya <[email protected]>
…1366)

Abstracted away the access to the path of the rootfs via a contextmanager.
In Arista secureboot, the rootfs is never extracted on the flash. Instead it's mounted directly from within the signed SWI.
The update_sonic_environment function however always assume that the rootfs to be at the same place.

- How I did it

To alleviate this restriction, a new context manager to obtain the rootfs is introduced.
The choice of a context manager rather than a function is entirely based on error management and cleanup.
Mounting a squashfs from a swi file requires the use of losetup which makes the rootfs available under /dev/loopX
Once done or on error, we need to free this resource which becomes free when using a contextmanager.
These issues are only seen on secureboot enabled platform.
What I did
Add a new reboot named as soft-reboot which can be performed by "kexec -e"

How I did it
Replace the platform reboot with "kexec -e" for the cold reboot case.

How to verify it
Verified the reboot on DUT and check the reboot-cause
Prevent potential kernel oops if drivers are removed/devices are deinitialized while PMon daemons are still trying to access those devices.
What I did
There is a bug that occasionally turn root-overlay as RO. This makes /etc & /home as RO. This blocks any new remote user login, as that needs to write into /etc & /home.

This tool scans /etc & /home (or given dirs) as in RW or RO state. If RO, it could create a writable overlay using tmpfs.
This is transient and stays until next reboot. Any write after the overlay will be lost upon reboot.

But this allows new remote users login.

How I did it
Create upper & work dirs in /run/mount (tmpfs). Mount /etc & /home as lowerdirs and use the same name for final merge. This allows anyone opening a file in /etc or /home to operate on the merged overlay, transparently.

How to verify it
Mount any dir on tmpfs ( mount -t tmpfs tmpfs test_dir)
remount as RO (mount -o remount,ro test_dir)
Pass that dir to this script. (disk_check.py -d ./test_dir)
Now it should be RW
…sonic-net#1584)

For 202012 branch ConfigDBConnector() is imported from swsssdk.
So to use ConfigDBConnector() we still have to import from swsssdk instead of swsscommon.
The sonic-net#1558 changed ConfigDBConnector() to be imported from swsscommon in show/muxcable.py
which causes unit test failure in sonic-utilities.
This PR fixes that.

Signed-off-by: vaibhav-dahiya <[email protected]>
… are no broken changes with future versions (sonic-net#1530) (sonic-net#1592)

Same as sonic-net#1530
But for 202012 branch

Fix a previous merge/cherry-pick mistake: deepdiff should be a tests_require
…sted (sonic-net#1566)

Enhancement: handle the case that no buffer change in the latest database version
Current, the following two versions are the same:
- The latest version changed by mellanox_buffer_migrator
- The latest version in CONFIG_DB

That won't be true if another part in CONFIG_DB is updated. In that case, the latest version in CONFIG_DB will be greater than the latest version in mellanox_buffer_migrator.
However, this can break the buffer migrator unit test:
- The db_migrator will always migrate the database to the latest version
- The config database version check will fail in case the latest version in the config database doesn't match that defined in the buffer migrator.

This is to support this case.

Signed-off-by: Stephen Sun <[email protected]>
…t#1580)

#### What I did
Modified show version command to pick serial number from STATE_DB if it was populated instead of getting it from EEPROM.

#### How I did it
Check state_db to see if serial number EEPROM section is populated. If yes use the data from DB. If not, read it from the decode-syseeprom
- What I did
Added 'pg-drop' to the files system of SONiC

- How I did it
Add 'scripts/pg-drop' to setup.py file

- How to verify it
Check that 'pg-drop' script exists in /usr/local/bin/pg-drop

Signed-off-by: Andriy Yurkiv <[email protected]>
…sonic-net#1594)

#### What I did

Gracefully handle improper 'specification_compliance' field

#### How I did it

The 'specification_compliance' field of transceiver info is expected to be a string representation of a dictionary. However, there is a chance, upon some kind of platform issue that a vendor's platform API returns something like 'N/A'. In this case, sfpshow would crash. Rather than crash, sfpshow should handle this gracefully and output 'N/A' instead.
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.