Commit Graph

1428 Commits

Author SHA1 Message Date
pettershao-ragilenetworks
8ceec5c843
[ruijie] Fix show version error info (#7541)
Fix following crash in `show version`:

```
Traceback (most recent call last):
  File "/usr/local/bin/decode-syseeprom", line 32, in instantiate_eeprom_object
    eeprom = sonic_platform.platform.Platform().get_chassis().get_eeprom()
AttributeError: module 'sonic_platform' has no attribute 'platform'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/decode-syseeprom", line 262, in <module>
    sys.exit(main())
  File "/usr/local/bin/decode-syseeprom", line 244, in main
    print_serial(use_db)
  File "/usr/local/bin/decode-syseeprom", line 169, in print_serial
    eeprom = instantiate_eeprom_object()
  File "/usr/local/bin/decode-syseeprom", line 34, in instantiate_eeprom_object
    log.log_error('Failed to obtain EEPROM object due to {}'.format(repr(e)))
NameError: name 'log' is not defined
```

Signed-off-by: pettershao-ragilenetworks <pettershao@ragilenetworks.com>
2021-05-06 14:53:20 -07:00
Samuel Angebault
e7c26fb0c9
[Arista] Update platform configurations and library (#7527)
Platform library changes
 - Fix the use of /proc/modules during testing, fixes #7463
 - Add `libsfp-eeprom.so` build to read/write xcvr eeproms in C
 - Add some more reboot-cause information
 - Write down temperature hw thresholds to the sensors
 - Report software thresholds through platform api
 - Writ `port_name sysfs` file of optoe`
 - Tests enhancements
 - Fix dependency issues for chassis provisioning

Platform configuration changes
 - Add `pcie.yaml` configuration for a few platforms
 - Mount `libsfp-eeprom.so` inside `pmon`
 - Fix `Arista-7050SX3-48C8` and `Arista-7050SX3-48YC8' platform and hwsku
 - Miscellaneous fixes

Co-authored-by: Boyang Yu <byu@arista.com>
Co-authored-by: Zhi Yuan Carl Zhao <zyzhao@arista.com>
2021-05-06 10:59:22 -07:00
Stephen Sun
9f0dce0313
[Mellanox] Optimize SFP modules initialization (#7537)
Originally, SFP modules were always accessed from platform daemons, and arbitrary SFP modules can be accessed in the daemon. So all SFP modules were initialized in one shot once one of the following chassis APIs called
- get_all_sfps
- get_sfp_numbers
- get_sfp

Recently, we noticed that SFP modules can also be accessed from CLI, eg. the latest refactor of `sfputil`.

In this case, only one SFP module is accessed in the chassis object's life cycle.
To initialize all SFP modules in one shot is waste of time and causes the CLI to take much more time to finish.
So we would like to optimize the initialization flow by introducing a two-phase initialization approach:
- Partial initialization, which means the `chassis._sfp_list` has been initialized with proper length and all elements being `None`
- Full initialization, which means all elements in `chassis._sfp_list` are created

If the relevant function is called,
- `get_sfp`, only partial initialization will be done, and then the specific SFP module is initialized.
- `get_all_sfps` or `get_num_sfps`, full initialization will be done, which means all SFP modules are initialized.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-05-06 10:14:48 -07:00
Aravind Mani
659d078fd3
DellEMC: Z9332f SFP enhancements (#7457)
#### Why I did it
400G media EEPROM and DOM information are not populated properly in DellEMC Z9332f platform.

#### How I did it
Handled QSFP_DD, QSFP28/QSFP+, SFP+ accordingly based on media type detected.
2021-05-05 10:03:11 -07:00
shlomibitton
2d3149d641
[Mellanox] Update FW to xx.2008.2526 (#7511)
- Why I did it
Updated FW to xx.2008.2526 version.

Fixed issues:
1. Spectrum-2, Spectrum-3 | sFlow | High CPU load and high on fully loaded switch.
2. Spectrum-2, Spectrum-3 | Fine grain LAG | in rare cases doesn’t update the right entry

- How I did it
Updated submodule pointer and version in a Makefile.

- How to verify it
Full regression and bugs validation

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
2021-05-05 09:47:57 +03:00
Alexander Allen
0bc0f98d48
[platform] Add serial number and model number to Mellanox PSU platform implementation (#7382)
#### Why I did it

We want to add the ability for the command `show platform psustatus` to show the serial number and part number of the PSU devices on Mellanox platforms. This will be useful for data-center management of field replaceable units (FRUs) on switches.

#### How I did it

I implemented the platform 2.0 functions `get_model()` and `get_serial()` for the PSU in the mellanox platform API by referencing the sysfs nodes provided by the [hw-management](https://github.com/Azure/sonic-buildimage/tree/master/platform/mellanox/hw-management) module.
2021-05-04 13:07:00 -07:00
Stephen Sun
b2286a24dc
[Mellanox] Adopt single way to get fan direction for all ASIC types (#7386)
#### Why I did it
Adopt a single way to get fan direction for all ASIC types.
It depends on hw-mgmt V.7.0010.2000.2303. Depends on https://github.com/Azure/sonic-buildimage/pull/7419

#### How I did it
Originally, the get_direction was implemented by fetching and parsing `/var/run/hw-management/system/fan_dir` on the Spectrum-2 and the Spectrum-3 systems. It isn't supported on the Spectrum system.
Now, it is implemented by fetching `/var/run/hw-management/thermal/fanX_dir` for all the platforms.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-05-03 17:10:18 -07:00
Wirut Getbamrung
cfda77b3de
[device/celestica]: Add thermalctld support on Haliburton platform APIs (#6493)
- Removed the old function for detecting a faulty fan.
- Removed the old function for detecting excess temperature.
- Implement thermal_manager APIs based on ThermalManagerBase
- Implement thermal_conditions APIs based on ThermalPolicyConditionBase
- Implement thermal_actions APIs based on ThermalPolicyActionBase
- Implement thermal_info APIs based on ThermalPolicyInfoBase
- Add thermal_policy.json
2021-05-03 09:14:35 -07:00
Junchao-Mellanox
d9cdf9d14f
[Mellanox] Adjust PSU fan name to align with sysfs file name (#7490)
Change PSU fan name from psu_{psu_index}fan{fan_index} to psu{psu_index}_fan{fan_index}
2021-05-02 08:14:56 -07:00
guxianghong
be4cf09b5d
[Centec][arm64] support new board E530-48s4x and E530-24x2q (#7189)
1. support new board E530-48s4x E530-24x2q
2. optimize platform driver for Centec TsingMa board

Co-authored-by: shi lei <shil@centecnetworks.com>
2021-05-01 10:37:07 -07:00
Stephen Sun
b3a283366c
Fix issue: exception occurred during chassis object being destroyed (#7446)
The following error message is observed during chassis object being destroyed

"Exception ignored in: <function Chassis.__del__ at 0x7fd22165cd08>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/sonic_platform/chassis.py", line 83, in __del__
ImportError: sys.meta_path is None, Python is likely shutting down
The chassis tries to import deinitialize_sdk_handle during being destroyed for the purpose of releasing the sdk_handle.
However, importing another module during shutting down can cause the error because some of the fundamental infrastructures are no longer available."

This error occurs when a chassis object is created and then destroyed in the Python shell.

- How I did it
To fix it, record the deinitialize_sdk_handle in the chassis object when sdk_handle is being initialized and call the deinitialize handler when the chassis object is being destroyed

- How to verify it
Manually test.
2021-04-29 11:33:39 +03:00
Junchao-Mellanox
ccc7bd1315
[Mellanox] Upgrade hw-mgmt to 7.0100.2303 (#7419)
- Why I did it
Upgrade hw-mgmt to 7.0100.2303

Bug fixes

1. Fan direction feature fix for fixed FAN system (using shell instead of binutils/strings)
2. Remove cpld 4th link on systems with only 3 CPLD's
3. hw-mgmt: thermal: Add hardcoded critical trip point. Follow-up after patch "Removing critical thermal zones to prevent unexpected software system shutdown".
4. Fix sensor attribute mapping to be label based instead of index based to allow common handling of voltage regulator names independently of hardware changes.
5. Update 'lm-sensors' custom configuration file. Relevant only for users utilizing sensors.conf files coming along with hw-management package.
6. For full feature list please follow https://github.com/Mellanox/hw-mgmt/blob/V.7.0010.2300_BR/debian/Release.txt

- How I did it
Update hw-mgmt pointer
Remove unused patches
Fix existing patch to make sure it apply successfully

- How to verify it
Full platform regression on all mellanox platforms
2021-04-28 16:21:55 +03:00
vmittal-msft
701afa2e88
Updated bcmsai to 4.3.3.5-1 to include MMU fixes and others (#7440) 2021-04-27 16:33:41 -07:00
Dror Prital
22abec3c5d
[mellanox]: Integrate SAI version 1.18.3.2 into Master branch (#7428)
Changes in the new release:

Fix 10G and 50G speeds in SAI XML to support all interface types
Enable SMAC=DMAC and SMAC MC in tunnel debug counter
Add tunnel statistics
Add isolation group API implementation
Fix ACL ANY debug counter to correctly track ACL drops
Add VXLAN source port hard coded range, controlled by K/V
FW dump me now feature
Add mlxtrace to saidump
Speed lane setting and AN control
Implement query stats API
VNI miss part of tunnel decal drop reason
Align with SAI API v1.8.1

Signed-off-by: Dror Prital <drorp@nvidia.com>
2021-04-27 16:24:59 -07:00
jostar-yang
93ceb3933e
[as7726-32x] Support PDDF (#7398)
Add PDDF support for Accton as7726-32x platform

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-27 11:01:40 -07:00
Stepan Blyshchak
cd2c86eab6
[dockers] label SONiC Docker with manifest (#5939)
Signed-off-by: Stepan Blyschak stepanb@nvidia.com

This PR is part of SONiC Application Extension

Depends on #5938

- Why I did it
To provide an infrastructure change in order to support SONiC Application Extension feature.

- How I did it
Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on
installed SONiC images.

- How to verify it
Build an image, execute the following command:

admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq
Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
2021-04-26 13:51:50 -07:00
Guohan Lu
27a635a15a Revert "Flashrom refactoring (#6922)"
This reverts commit 7dd9d1f3f2.
2021-04-25 11:51:35 -07:00
roman_savchuk
d4f2cafa10
[barefoot]: Updated SAI to 1.8.1 (#7412)
Signed-off-by: Roman Savchuk <romanx.savchuk@intel.com>
2021-04-24 12:46:56 -07:00
abdosi
ee98b17281
[submodule update] sonic-sairedis to move to SAI1.8.1 (#7393)
What/Why I did:

Updated sonic-sairedis submodule to use SAI1.8.1
[Submodule update] sonic-sairedis
d821bc0b137264daa01c347700c7c14677cf3370 (HEAD -> master, origin/master, origin/HEAD) [Mellanox] Add SAI template 
config support (#803)
bb341e9ea069e974a41930d434d437f522476f29 [syncd] Bring back TimerWatchdog (#821)
badf6cea2650015269420932a9186113d1ad5ec6 Update .gitignore (#822)
1494bc69046ffe7135377844548a11e4168b407c [meta] Mark local function static (#818)
34e961cf39e9af93f492f66640739e1c7a1694c8 [pyext] Fix pyext/py2 library (#820)
0d3749d3a93fd7e59ebb83b49fa1d7e2a56d6cf4 Moved SAI Header to git tag v1.8.1 (#816)
70fff780d529f78b53af4bd104f4932d0c4d8dd6 Added --purge of base docker image packages before installing new ones. (#819)

Updated Broadcom SAI Debian package to 4.3.3.4-2 to use SAI 1.8.1 Header
2021-04-21 17:41:45 -07:00
Kebo Liu
b43c4001f8
[Mellanox] Update SDK to 4.4.2522 and FW to 2008.2520 (#7391)
New features and fixes in the new SDK/FW:

SN4600C | AN/LT support
SN2700 | AN/LT bugs fixes
WJH | FID_MISS support

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-04-21 10:50:14 -07:00
Santhosh Kumar T
7dd9d1f3f2
Flashrom refactoring (#6922)
#### Why I did it
To build flashrom properly with dependency tracking.

#### How I did it
Moved flashrom code from platform/broadcom/sonic-platform-modules-dell/tools directory to src/flashrom directory.
At the end, flashrom_0.9.7_amd64.deb package is build which will be installed in the devices.
2021-04-20 15:24:44 -07:00
vmittal-msft
0eb6b713c3
libsaibcm TD3 MMU init patch from BRCM (#7341) 2021-04-20 15:04:54 -07:00
Rajkumar-Marvell
c8e06dffa6
[marvell] Move armhf syncd build from stretch to buster. (#7366)
Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>
2021-04-19 15:10:52 -07:00
guxianghong
6fe6d7394d
[arm] support compile sonic arm image on arm server (#7285)
- Support compile sonic arm image on arm server. If arm image compiling is executed on arm server instead of using qemu mode on x86 server, compile time can be saved significantly.
- Add kernel argument systemd.unified_cgroup_hierarchy=0 for upgrade systemd to version 247, according to #7228
- rename multiarch docker to sonic-slave-${distro}-march-${arch}

Co-authored-by: Xianghong Gu <xgu@centecnetworks.com>
Co-authored-by: Shi Lei <shil@centecnetworks.com>
2021-04-18 08:17:57 -07:00
Samuel Angebault
cd478bdeee
[Arista] Update platform drivers submodules (#7325)
- Fix build issue when `/proc/cmdline` is not available. Fixes #7145
 - Properly detect linecard slot from linecard CPU
 - Some fixes on the uart link between supervisor and linecard CPU
 - Other small fixes
2021-04-16 11:31:36 -07:00
Aravind Mani
0939c54d36
[Dell S6100]: Add dell ich driver (#7336)
dell_ich driver was removed as part of #7309 and it is needed for watchdog tickle in S6100 platform.
2021-04-15 23:08:15 -07:00
jostar-yang
ee728aab7b
[as7326-56x] Add to support PDDF (#7176)
Support PDDF on the as7326-56x platfrom

Signed-off-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-15 09:39:15 -07:00
Blueve
a523be94bb
[HLX] Fix issue where HLX module failed to do postinit (#7274)
Signed-off-by: Jing Kan jika@microsoft.com
2021-04-15 14:18:13 +08:00
jostar-yang
6641a6b1a1
[as9716-32d] Add to support PDDF (#6902)
Add PDDF support for Accton as9716-32d platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:43:52 -07:00
jostar-yang
b4b9e4234f
[as7816-64x] Add to support PDDF (#7077)
Add PDDF support for Accton as7816-64x platform

Co-authored-by: Jostar Yang <jostar_yang@accton.com.tw>
2021-04-14 14:40:52 -07:00
Aravind Mani
95fecafdf9
Dell S6100: Modify transceiver change event from interrupt to poll mode (#7309)
#### Why I did it

- xcvrd crash was seen in latest 201811 images.
- For Dell S6100,API 2.0 uses poll mode while 1.0 was still using interrupt mode.

#### How I did it

- Modified get_transceiver_change_event in 1.0 to poll mode.
2021-04-14 12:12:30 -07:00
fk410167
42d22f4953
Invoking python3 installation for PDDF 2.0 PAI package (#7100)
Adjusting the PDDF utility with python3 commands
2021-04-08 08:21:17 -07:00
Stephen Sun
46a7fac1aa
Bug fix: Support dynamic buffer calculation on ACS-MSN3420 and ACS-MSN4410 (#7113)
- Why I did it
Add missed files for dynamic buffer calculation for ACS-MSN3420 and ACS-MSN4410

- How I did it
asic_table.j2: Add mapping from platform to ASIC
Add buffer_dynamic.json.j2 for ACS-MSN4410.

- How to verify it
Check whether the dynamic buffer calculation daemon starts successfully.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-04-07 20:33:15 +03:00
Samuel Angebault
d4209e2a50
[Arista] Update platform library submodules (#7205)
Platform API
 -  Fix Watchdog get_remaining_time logic
 -  Improve Sfp platform API implementation
 -  Improve EepromDecoder API implementation
 -  Fix mismatch between Fan name and platform.json
 -  Add PSU get_maximum_supplied_power

Internal
 - Refactor of Xcvr declaration and initialization
 - Cleanup of Resets and Gpios
 - Add platform library versioning to enhance support capabilities
 - Allow supervisor to manage cards from slot 2
 - Miscelanous cleanups and refactors

Signed-off-by: Samuel Angebault <staphylo@arista.com>
2021-04-06 09:04:47 -07:00
gechiang
e5c2937fae
BRCM SAI 4.3.3.4 Pick up 8 major bug fixes (#7218) 2021-04-02 13:44:19 -07:00
Wirut Getbamrung
fbcb9403e8
[device/celestica]: Fix failed test cases of DX010 platform APIs (#6564)
1. Add device/celestica/x86_64-cel_seastone-r0/platform.json 
2. Update functions to support python3.7
3. Add more functions follow latest sonic_platform_base
4. Fix the bug

Co-authored-by: 119064273 <2276096708@qq.com>
Co-authored-by: Eric Zhu <erzhu@celestica.com>
Co-authored-by: doni@celestica.com <doni@celestica.com>
2021-04-02 10:08:31 -07:00
vganesan-nokia
973affce39
[voq/inbandif] Support for inband port as regular port (#6477)
Changes in this PR are to make LLDP to consider Inband port and to avoid regular
port handling on Inband port.
2021-04-01 16:24:57 -07:00
gechiang
6f65b42e4c
7260cx3 DualToR config.bcm support based on DualToR setting in device metadata at boot time (#7168)
* 7260cx3 DualToR config.bcm support based on DualToR setting in device metadata at boot time. 
For HWSKU Arista-7260CX3-C64 the MMU setting SOC for T0/T1 is also combined into the config.bcm.j2 logic so use just one config file and adding delta based on Switch Roles.
2021-03-31 14:23:24 -07:00
Stephen Sun
ecaf97d8a3
[mellanox]: Integrate hw-mgmt package V.7.0010.2002 (#7148)
Integrate hw-management package V.7.0010.2002

Bug fixes:
Removing critical thermal zones to prevent unexpected software system shutdown:
*Kernel 4.9 -0071-mlxsw-core-Remove-critical-trip-point-from-thermal-z.patch
*Kernel 4.19 -076-mlxsw-core-Remove-critical-trip-point-from-thermal-z.patch
Removing redundant link for cpld3 for fixed systems (SN2100, SN2010).
Fix an issue with missed attribute for cpld3 (port CPLD) for SN2700, SN2410.

Signed-off-by: Stephen Sun <stephens@nvidia.com>
2021-03-30 18:30:15 -07:00
guxianghong
f1135206f8
[Centec] syncd containers based on buster should use python3 (#7185)
Upgrade python2 to python3 for supervisord.conf in docker-syncd-centec

Co-authored-by: shi lei <shil@centecnetworks.com>
2021-03-30 08:31:21 -07:00
Myron Sosyak
08520941b0
[barefoot]: Updated SDK packages to 20210324 (#7142)
Update unsupported SAI attr ('SAI_ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID') to fix issues on acl table create
2021-03-29 15:28:49 -07:00
arheneus@marvell.com
e38e374077
[marvell]: Marvell prestera kernel driver (#7066)
Build Marvell kernel driver for prestera sai sdk
Builds interrupt and dma kernel driver
Removed the older method pre-compiled kernel module debian package and its makefile
2021-03-29 15:27:01 -07:00
Joe LeVeque
c651a9ade4
[dockers][supervisor] Increase event buffer size for process exit listener; Set all event buffer sizes to 1024 (#7083)
To prevent error [messages](https://dev.azure.com/mssonic/build/_build/results?buildId=2254&view=logs&j=9a13fbcd-e92d-583c-2f89-d81f90cac1fd&t=739db6ba-1b35-5485-5697-de102068d650&l=802) like the following from being logged:

```
Mar 17 02:33:48.523153 vlab-01 INFO swss#supervisord 2021-03-17 02:33:48,518 ERRO pool supervisor-proc-exit-listener event buffer overflowed, discarding event 46
```

This is basically an addendum to https://github.com/Azure/sonic-buildimage/pull/5247, which increased the event buffer size for dependent-startup. While supervisor-proc-exit-listener doesn't subscribe to as many events as dependent-startup, there is still a chance some containers (like swss, as in the example above) have enough processes running to cause an overflow of the default buffer size of 10.

This is especially important for preventing erroneous log_analyzer failures in the sonic-mgmt repo regression tests, which have started occasionally causing PR check builds to fail. Example [here](https://dev.azure.com/mssonic/build/_build/results?buildId=2254&view=logs&j=9a13fbcd-e92d-583c-2f89-d81f90cac1fd&t=739db6ba-1b35-5485-5697-de102068d650&l=802).

I set all supervisor-proc-exit-listener event buffer sizes to 1024, and also updated all dependent-startup event buffer sizes to 1024, as well, to keep things simple, unified, and allow headroom so that we will not need to adjust these values frequently, if at all.
2021-03-27 21:14:24 -07:00
vmittal-msft
bcff251a71
[broadcom]: Updated bcmsai to 4.3.3.3 (#7090)
To add latest SAI drop REL_4.3.3.3 to SONIC which addresses the following CSP cases:

CS00012058054: [4.3][IPinIP][TTL-PIPE] IPinIP TTL Pipe Mode is NOT working it is behaving UNIFORM mode even programed as PIPE mode
CS00011227466: [4.3] Warmboot support with tunnel encap
2021-03-27 21:13:28 -07:00
Volodymyr Samotiy
b30595ac49
[Mellanox] Update SDK to 4.4.2508 and FW to xx.2008.2508 (#7141)
Fix the following issues:

Spectrum-2, Spectrum-3 | Port | Fix link issue when using 25 GbE rate between two ports while one is on Spectrum-2-based system and the other is on Spectrum-3-based system
All | warmboot | fail to upgrade from earlier SONiC versions with official SDK/FW 4.4.2306 (was on SONiC 201911)
All | What-Just-Happened | When enabling or disabling WJH under high traffic load to the host CPU, in very specific and low probability conditions, an error could occur, that may result in loss of data, channel failure or in extreme cases SW failure

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
2021-03-27 11:51:49 -07:00
Joe LeVeque
b512394398
[docker-gbsyncd-vs] Run new gbsyncdmgrd in lieu of deprecated gbsyncd_startup.py (#7154)
To improve management of docker-gbsyncd-vs. gbsyncd_startup.py simply spawned syncd processes and then exited. In that case, supervisord would no longer manage any processes in the container, and thus there was no way to know if a critical process had exited.

I recently created gbsyncdmgrd to be a more complete, robust replacement for gbsyncd_startup.py.

NOTE: This PR is dependent on the inclusion of gbsyncdmgrd in the sonic-sairedis repo. A submodule update is pending at
#7089
2021-03-27 11:42:23 -07:00
Mykola Gerasymenko
e8f4a8b148
[barefoot]: Add psample module to load at boot time on BFN platform (#7164)
The psample module was not loaded on barefoot platform. The loading of this module is a prerequisite for testing SFlow.

* add `.gitignore` to the `barefoot` subdirectory to overwrite ignore "platform/**/debian/*" in the root directory
2021-03-26 11:08:28 -07:00
Volodymyr Boiko
e1d8d1895b
[platform][barefoot] Lazy initialize fans and thermals list (#7103)
Initialize fans and thermals lists on demand; make them properties in order to reduce Chassis object initialization time

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-26 10:18:54 -07:00
Junchao-Mellanox
93a54450d3
Fix issue: should not initialize led color in __init__ file as platform API will be called by multiple daemons (#7114)
- Why I did it
The existing Fan led and Psu led object initialize itself to green color in init method. However, there are multiple daemons calls sonic platform API and there could be a case that:

A PSU is removed from system
Reboot switch
psud detects that 1 PSU is missing and set PSU led to red
Other daemon just start up and call sonic platform API, the API set PSU led to green by call PsuLed.init
This PR is a partial fix for the issue. As we also need guarantee that the led is initialized with a correct value. I checked existing psud and thermalctld code. psud always initialize the PSU led color on boot up, thermalcltd need some changes to initialize led color on the first run

- How I did it
Remove the led color initialization code from FanLed.init and PsuLed.init

- How to verify it
Manual test
2021-03-25 14:28:33 +02:00
Volodymyr Samotiy
c7cc4b465b
[Mellanox] Update FW to xx.2008.2424 (#7118)
Fixed issues:
* Mellanox SN-2700 breakout port not linking up with QSA

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
2021-03-22 18:27:36 -07:00
Joe LeVeque
a3cafee02c
[docker-gbsyncd-vs] Run gbsyncd_startup.py directly (#7084)
Eliminate the need for `gbsyncd_start.sh`, which simply calls `exec "/usr/bin/gbsyncd_startup.py"`. The shell script is unnecessary.

Once this PR merges, we can remove `gbsyncd_start.sh` from the sonic-sairedis repo.
2021-03-19 10:52:28 -07:00
Junchao-Mellanox
8504c72f14
[Mellanox] Initialize PSU API on both host and docker side (#7016)
There was a change to replace platform utils with sonic platform API in psuutil. However, psu API is not initialized on host side. The PR is to fix it.
2021-03-15 12:43:18 -07:00
sandycelestica
f938e7fc79
[celestica]: Fix E1031 udev rules not work for sonic os first boot after be installed (#7043)
Use udevadm to trigger the udev rules on the first boot

How to verify:

- Connect C0 with E1031;
- Install or upgrade the sonic os to 202012 branch;
- When access to sonic check if /dev/C0-1 to /dev/C0-48 are existed.
2021-03-13 15:35:59 -08:00
Kebo Liu
c82aaaeb41
[Mellanox] Update SDK to 4.4.2418, FW to 2008.2416, SAI to new commit (#7041)
- Why I did it
To pick up new features and fix from SDK/FW and SAI

SDK/FW new Feature:

All | Added support for multiple modules and cable types. For full list contact Nvidia networking support
Spectrum-3 | SN46000C | Added support for up to 5W on ports 49 to 64 .
SDK/FW bugs' fix:

All | fast reboot | fast boot failure from latest 201811 to 201911 and above
Spectrum | 10GbE/1GbE Transceiver (FTLX8574D3BCV) stopped working after firmware upgrade
Spectrum-2 | When device is rebooted with locked Optical Transceivers in split mode, the firmware may get stuck
Spectrum-2 | SN3700 | When connecting at 200GbE to Ixia K400, Ixia receives CRC errors
Spectrum-2 | SN3800 | On rare occasions packets loss may be experienced due to signal integrity issues
Spectrum-2 | When the port is a member of a LAG, after a warmboot and port toggle on the peer-side, the port remains down
Spectrum-3 | SN4700 | While using Optic cable in Split 4x1 mode in PAM4, when two first ports are toggled, the other 2 ports go down
Spectrum-3 | SN4700 | When working in 400GbE, deleting the headroom configuration (changing buffer size to zero) on the fly may cause continual packet drops
SAI

All | sFlow | Use hardcoded value 1 as netlink group number ax expected by hsflowd
- How I did it
Update the related version number in the make files and update the submodule pointer accordingly.

- How to verify it
Run regression test and everything works good.
2021-03-13 21:19:40 +02:00
Volodymyr Boiko
1785efa6b0
[platform][barefoot] Use urllib.parse.quote (#7010)
Fix Python 2 -> Python 3 migration issue

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-12 11:52:47 -08:00
Volodymyr Boiko
8c176064ac
[barefoot][platform] Extend sonic_platform psu.py (#7006)
Improve sonic_platform PSU support

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-12 11:50:36 -08:00
fk410167
0144258121
Few more python3 compatibility changes, PEP8 standard changes and add missing methods in PDDF common base APIs (#7021)
#### Why I did it
- Python3 compatibility changes for PDDF eeprom class
- Adding API for temperature in PDDF psu class
- PEP8 standard changes and adding missing method in PDDF sfp class

#### How I did it
- Using python3 to invoke the sonic_platform module in PDDF based platform
- Running autopep8 tool to comply to PEP8 standards
2021-03-12 11:49:22 -08:00
Volodymyr Boiko
72110d08eb
[barefoot][platform] Support fans and thermal (#7004)
Add support for fans and thermals to sonic-platform package for Montara platform

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-12 10:52:48 -08:00
Volodymyr Boiko
35dd885c18
[platform][barefoot] Drop python2 support (#7029)
No longer install Python 2 sonic_platform package for Broadcom platforms; only install Python 3 package.

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-11 19:00:19 -08:00
Junchao-Mellanox
7caa70d2d6
[Mellanox] Fixes issue: CLI sfputil does not work based on sonic platform API (#7018)
#### Why I did it

Recently, CLI sfputil replace the old sonic platform utils with sonic platform API. However, sonic platform API does not support SFP low power mode and reset related operation. The PR is to fix it.

The change to replace platform utils with sonic platform API was reverted on 202012, once this PR is merged, we can cherry-pick these two PRs to 202012 together.

#### How I did it

In low power mode and reset related operation, use "docker exec" if the command is running on host side.
2021-03-11 18:54:33 -08:00
DavidZagury
6779118d71
[Mellanox] Update MFT to 4.16.0-105 (#7007)
- Why I did it
Update MFT tool version to 4.16.0

Bugs fixes:
mlxlink: Fixed an issue that caused the margin scan to fail with the following message: Eye scan not completed.
mlxcable: Cable firmware burning capability is not supported.

New features:
mlxlink: Enabled margin scan on Network links.
mlxlink: Added PRBS TX/RX polarity inversion using the following flags: --invert_tx_polarity / --invert_rx_polarity

- How I did it
Update MFT make file with new version number.

- How to verify it
Build image and test related functions on Mellanox platform
2021-03-10 22:03:43 +02:00
vpsubramaniam
377ea1a229
DellEMC: Z9332F - Watchdog support, add platform.json, new platform API implementation and fixes (#6988)
Incorporate the below changes in DellEMC Z9332F platform:

- Implemented watchdog platform API support
- Implement ‘get_position_in_parent’, ‘is_replaceable’ methods for all device types
- Change return type of SFP methods to match specification in sonic_platform_common/sfp_base.py
- Added platform.json file in device directory.

Co-authored-by: V P Subramaniam <Subramaniam_Vellalap@dell.com>
2021-03-10 10:49:33 -08:00
Santhosh Kumar T
f6fb72b7b6
[Dell] S6100 S6000 - Show techsupport enhancement (#6410)
- Why I did it

To collect platform based logs along with "show techsupport" on S6000 and S6100 plaforms.
- How I did it
On branch dell_techsupport_dump
Changes to be committed:
(use "git reset HEAD ..." to unstage)

    new file:   platform/broadcom/sonic-platform-modules-dell/common/actions.sh
    modified:   platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6000.install
    modified:   platform/broadcom/sonic-platform-modules-dell/debian/platform-modules-s6100.install
    new file:   platform/broadcom/sonic-platform-modules-dell/s6000/scripts/hw-management-generate-dump.sh
    new file:   platform/broadcom/sonic-platform-modules-dell/s6100/scripts/hw-management-generate-dump.sh
- How to verify it
hw-mgmt-dump.tar.gz will be found in sonic_dump__< YYYYMMDD_HHMMSS>.tar.gz.
2021-03-09 15:49:24 -08:00
Wirut Getbamrung
6ae2cb5607
[device/celestica]: Add xcvrd event support for Haliburton (#6517)
#### Why I did it
- The xcvrd service requires an event detection function, unplug or plug in the transceiver.

#### How I did it
- Add sysfs interrupt to notify userspace app of external interrupt
- Implement get_change_event() in chassis api.
- Also begin installing Python 3 sonic-platform package for Celestica platforms
2021-03-08 10:10:11 -08:00
gechiang
653bd083fb
BRCM SAI 4.3.3.1-1 pick up Temp Patch to fix Dual TOR ACL issue CS00011559393 (#6980) 2021-03-07 12:40:15 -08:00
SuvarnaMeenakshi
5dbb4bc7d6
[multi-asic][vs]: Update readme file to create multi-asic vs (#6867)
Readme file should be updated with steps required to bring up multi-asic virtual switch.
2021-03-05 12:46:07 -08:00
Volodymyr Boiko
4bba31481a
[barefoot][platform] Fix as9516bf installation (#6967)
Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-05 11:22:29 -08:00
Volodymyr Boiko
be3d4e9a81
[platform][barefoot] Fix as9516bf installation (#6938)
To fix sonic_platform installation on as9516bf platform

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-03-03 09:23:40 -08:00
Samuel Angebault
b6fc13b89b
[Arista] Update platform drivers (#6945)
- Provide `hw-management-generate-dump.sh` for `show techsupport`
 - Load `optoe3` for OSFP and QSFP-DD transceivers
 - Enhance reboot-cause caching robustness

Signed-off-by: Samuel Angebault <staphylo@arista.com>
2021-03-03 09:09:10 -08:00
vmittal-msft
6eb9a9d0eb
Updated BCM SAI to latest 4.3.3.1 drop (#6947) 2021-03-03 09:07:53 -08:00
fk410167
20f0f069c1
Making PDDF 2.0 base classes python3 compliant (#6924)
- Made python2 to python3 changes
- Removed ord() func as python3 return int instead of str
- Had to change chr(..) to bytes([..]) function while using ctypes class methods
2021-03-01 09:48:59 -08:00
Kebo Liu
0e71d82f72
[Mellanox] Update hw-management package to version 7.0010.2000 (#6692)
- Why I did it
   Bug fixes
   - In rare cases when thermal algorithm is reactivated after FAN/PSU insertion, FAN remains at high rpm
   - When stop hw-management code received error in the log instead of exit code '0'.
   - In SPC1 i2c sometimes collide with chip reset coming from SDK
   - Remove raw eeprom data link, when working with PSU which don't have eeprom for "msn274x", "msn24xx" and "msn27xx" systems
   - Fix memory leak on mlxsw_core_bus_device module removal

- How I did it
Update the hw-mgmt version number in the make file
Update the hw-mgmt repo pointer

- How to verify it
run platform related test cases on all Mellanox platform

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-03-01 10:01:50 +02:00
Sangita Maity
18263c99dd
[DPB|master] Update Dynamic Port Breakout Logic for flexible alias support a… (#6831)
To fix [DPB| wrong aliases for interfaces](https://github.com/Azure/sonic-buildimage/issues/6024) issue, implimented flexible alias support [design doc](https://github.com/Azure/SONiC/pull/749)

> [[dpb|config] Fix the validation logic of breakout mode](https://github.com/Azure/sonic-utilities/pull/1440) depends on this

#### How I did it

1. Removed `"alias_at_lanes"` from port-configuration file(i.e. platfrom.json) 
2. Added dictionary to "breakout_modes" values. This defines the breakout modes available on the platform for this parent port, and it maps to the alias list. The alias list presents the alias names for individual ports in order under this breakout mode.
```
{
    "interfaces": {
        "Ethernet0": {
            "index": "1,1,1,1",
            "lanes": "0,1,2,3",
            "breakout_modes": {
                "1x100G[40G]": ["Eth1"],
                "2x50G": ["Eth1/1", "Eth1/2"],
                "4x25G[10G]": ["Eth1/1", "Eth1/2", "Eth1/3", "Eth1/4"],
                "2x25G(2)+1x50G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"],
                "1x50G(2)+2x25G(2)": ["Eth1/1", "Eth1/2", "Eth1/3"]
            }
        }
}
```
#### How to verify it
`config interface breakout`

Signed-off-by: Sangita Maity <samaity@linkedin.com>
2021-02-26 00:13:33 -08:00
Joe LeVeque
ac15a42c57
[DellEMC] Ensure concrete platform API classes call base class initializer (#6853)
In preparation for the merging of Azure/sonic-platform-common#173, which properly defines class and instance members in the Platform API base classes.

It is proper object-oriented methodology to call the base class initializer, even if it is only the default initializer. This also future-proofs the potential addition of custom initializers in the base classes down the road.
2021-02-25 11:20:34 -08:00
Joe LeVeque
516ff8bfff
[Mellanox] Ensure concrete platform API classes call base class initializer (#6854)
In preparation for the merging of Azure/sonic-platform-common#173, which properly defines class and instance members in the Platform API base classes.

It is proper object-oriented methodology to call the base class initializer, even if it is only the default initializer. This also future-proofs the potential addition of custom initializers in the base classes down the road.
2021-02-25 11:06:22 -08:00
ec-michael-shih
66e3e51f70
[Platform] Accton add to support as4630-54te platform. (#6683)
Add support for Accton as4630-54te platform
2021-02-25 10:47:38 -08:00
Aravind Mani
ab785f52d3
DellEMC:Fix EEPROM read error (#6736)
#### Why I did it
EEPROM read failure was seen in Dell platforms

#### How I did it
Make python 2/3 compliant API's to fix the issue
2021-02-25 10:17:05 -08:00
Rajkumar-Marvell
965f4901ec
[Marvell] Updated armhf SAI deb version info. (#6863)
Modified the MRVL SAI debian version format to include debian revision number. This helps in identifying the SAI deb causing any build/runtime issue.

Signed-off-by: Rajkumar Pennadam Ramamoorthy <rpennadamram@marvell.com>
2021-02-25 09:17:45 -08:00
shlomibitton
3de6a67353
[Mellanox] Add hw-mgmt patch for SimX platform adaptation (#6782)
- Why I did it
System is stuck on 'starting' state on SimX platform because of infinite loop on 'hw-management-ready.sh' script .
The loop is polling to check if the hw-mgmt sysfs created before proceeding with the flow, for SimX platform the sysfs will never create so the system is not starting properly.

- How I did it
Add a condition to poll on hw-mgmt sysfs only if the switch is real HW and not SimX platform.

- How to verify it
Check "systemctl status hw-management.service" output on a SimX switch with this patch, the state will be "active".

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
2021-02-25 12:41:29 +02:00
DavidZagury
5aee92e56d
[Mellanox] Add support for SN4600 system (#6879)
- Why I did it
Add support for new 64x200G SN4600 systems

- How I did it
Add all relevant files (w/o platform.json and hwsku.json as they will come later) with default SKU.

- How to verify it
Install image on switch, verify all ports are up and configured properly, run full platform SONiC tests.
2021-02-25 09:30:43 +02:00
ruijie.com.cn
a582c13e98
[Ruijie] Add ruijie platform & device (#4954)
Add new platform x86_64-ruijie_b6510-48vs8cq-r0 (Trident 3)
    ASIC Vendor: Broadcom
    Switch ASIC: Trident 3
    Port Config: 48x25G+8x100G

Signed-off-by: tim-rj <sonic_rd@ruijie.com.cn>
2021-02-24 16:45:27 -08:00
Arun Saravanan Balachandran
142d93b80a
DellEMC: S5232, Z9264, Z9332 - Platform API fixes (#6842)
#### Why I did it

To incorporate the below changes in DellEMC S5232, Z9264, Z9332 platforms.

- Update thermal high threshold values
- Make watchdog API Python2 and Python3 compatible
- Fix LGTM alerts
- Z9264: Fix get_change_event timer value

#### How I did it

- Use 'universal_newlines=True' in subprocess.Popen call.
- Change the timeout in 'get_change_event' to milliseconds to match specification in sonic_platform_common/chassis_base.py
2021-02-24 12:42:01 -08:00
Samuel Angebault
cf55ca110d
[Arista] Update driver submodules (#6873)
- Fix parent `__init__` call for platform API, based on Azure/sonic-platform-common#173
 - Implementation for more platform API methods
 - Daily storage information reporting in `arista daemon`
 - Enhancements to reboot cause reporting, now multi-sourcing reboot cause information
 - Miscellaneous fixes
2021-02-24 12:32:48 -08:00
rkdevi27
a37824ff0c
[dell/s6000]: Enable graceful reboot in S6000 (#6835)
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.

Moved the platform_reboot to platform_reboot_override and hooked it to the systemd shutdown services as in S6100
2021-02-24 12:00:24 -08:00
Eran Dahan
a472cabc0b
[Docker] Added support for python2 (#6753)
- Why I did it
Mellanox SDK APIs support python 2 at the moment.

- How I did it
Mellanox SDK APIs support python 2 at the moment.

- How to verify it
Add python 2 to Mellanox syncd only.

- Which release branch to backport (provide reason below if selected)
docker exec -t syncd /bin/bash -c "sx_api_dbg_generate_dump.py /home/sx_api_dbg_dump"
You can see that it will work and generate /home/sx_api_dbg_dump

Signed-off-by: allas <allas@nvidia.com>
2021-02-24 19:49:58 +02:00
Volodymyr Boiko
8c4fd2b73b
[barefoot][platform] Refactor legacy scripts (#6871)
Removed or adapted obsolete code

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-24 09:42:18 -08:00
Volodymyr Boiko
8ec75803a7
[barefoot][device][platform] Moved pcie.yaml (#6862)
To fix #6860

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-23 13:16:42 -08:00
dflynn-Nokia
cbe7493b8e
[Nokia ixs7215] Platform API 2.0 improvements (#6787)
- Improve sonic-mgmt platform test suite pass rate
- Improve coverage of platform unit tests
- Provide platform specific reboot logic as per platform porting guide
- Fix bug due to pcie.yaml file being located in the wrong directory
2021-02-23 09:25:14 -08:00
roman_savchuk
a2b7cdfda3
[build]: fixed BFN target build (#6826)
#### Why I did it
Fix runtime issues caused by SONiC update

#### How I did it
- new attribute SAI_ACL_ENTRY_ATTR_FIELD_ACL_IP_TYPE  supported 
- new attribute SAI_SWITCH_ATTR_AVAILABLE_IPMC_ENTRY supported

Signed-off-by: Roman Savchuk <romanx.savchuk@intel.com>
2021-02-22 23:31:33 -08:00
Aravind Mani
3aee87d6dc
Dell S6000,S6100 system health changes (#6788)
Needed support for platform system health in Dell platforms
2021-02-22 23:26:59 -08:00
Myron Sosyak
7ec4d15320
[BFN] Fix MTU for internal interface (#6783)
Set correct MTU size of internal interface for Newport platform
2021-02-22 10:23:46 -08:00
Sujin Kang
d5238ae8dd
[pcie.yaml] Move pcie configuration file path to platform directory (#6475)
- Why I did it
The pcie configuration file location is under plugin directory not under platform directory.
#6437

- How I did it

Move all pcie.yaml configuration file from plugin to platform directory.
Remove unnecessary timer to start pcie-check.service
Move pcie-check.service to sonic-host-services
- How to verify it
Verify on the device
2021-02-21 08:27:37 -08:00
Samuel Angebault
5fb374b03d
[Arista] Driver and platform update (#6468)
- Add support for `DCS-7050SX3-48YC8` and `DCS-7050SX3-48C8` platform
 - Add support for more variants of `DCS-7280CR3-32[PD]4`
 - Add Supervisor to Linecard consutil support
 - Complete Watchdog platform API support
 - Fix some PSU behavior on `DCS-7050QX-32` and `DCS-7060CX-32S`
 - Fix SEU management on `DCS-7060CX-32S`
 - Allow kernel modules to build up to linux 5.10
 - Rename led color `orange` to `amber`
 - Miscellaneous fixes
2021-02-19 10:48:52 -08:00
Volodymyr Samotiy
ea100d2a19
[Mellanox][SAI] update submodule pointer (#6806)
Open ACL Outer VLAN ID for egress for ports part of VLAN RIF

- Why I did it
Open ACL Outer VLAN ID for egress for ports part of VLAN RIF

- How I did it
Updated SAI submodule pointer

- How to verify it
Build an image, deploy and check all is up and running.
Verify ACL sonic-mgmt test is passing

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
2021-02-18 11:53:19 +02:00
Volodymyr Samotiy
6998aef114
[Mellanox] Update SDK to 4.4.2318, FW to *.2008.2314 (#6794)
To have the following fixes:
* All | Port status remains down after warm boot and flapping the port on peer side
* All | LAG HASH  | IPv6 SRC_IP is not accounted in LAG hashing [
* All | ASIC driver | Kernel crash observed when driver reload is initiated before it fully loaded
* Spectrum-3 | Buffer | In lossless configuration, headroom is been evicted only when the shared buffers is free
* All | prevent FW access during ISSU

Signed-off-by: Volodymyr Samotiy <volodymyrs@nvidia.com>
2021-02-16 18:07:11 -08:00
Joe LeVeque
c651fbc5d6
[platform] Update path to udevprefix.conf file (#6779)
Azure/sonic-utilities#1431 changes the path to the udevprefix.conf file. The file previously inappropriately resided in the <platform>/plugins/ directory. That directory is reserved for now-deprecated Python platform plugins, and will be removed in the near future.
2021-02-14 10:40:24 -08:00
gechiang
0252425377
[broadcom]: BRCM SAI 4.3.0.13-1 Pick up BRCM Patch to fix bogus interface counters (#6775)
This PR is needed to fix the show interface counters output issue where the counters are not correct due to an issue introduced in BRCM SAI 4.3.

- How to verify it
Without the fix if one injects packets, the expected counters for the interfaces involved do not show correct count values. The RX count looks to be TX count while TX count looks to be RX count but even that the values could not be trusted.
After the fix the counters started to look correct. Here is one sample output taken after the fix is applied where I manually injected 10,000 packets into Ethernet92 to be routed out of the port channel member port Ethernet40. Also injected 10,000 invalid packets into the same Ethernet92 and all 10,000 packets were shown RX_DRP correctly.
2021-02-12 03:00:16 -08:00
Volodymyr Boiko
b8da05147e
[barefoot][sonic-platform] Fix sfp reset (#6746)
Fix wrong sfp reset return value

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-11 18:13:53 -08:00
Volodymyr Boiko
72ca4d740b
[barefoot][sonic-platform] Refactor sfp.py (#6770)
Use separate file for each sfp eeprom operation

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-11 17:53:15 -08:00
Volodymyr Boiko
32c497f5e3
[barefoot][sonic-platform] Fix get_system_eeprom_info and refactor eeprom.py (#6739)
Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-11 15:00:35 -08:00
carl-nokia
2bf1806a34
[Platform][ixs7215]: Platform API test required files with Updates and Improvements (#6738)
- Why I did it
Enable platform API tests to run successfully by providing required test infrastructure files along with supporting changes.

- How I did it
Added platform.json along with supporting changes.
- Addition of pcie.yaml supporting pcied
- Addition of Real fan drawer support vs Virtual
- Removal of python2 wheel with support in place for python3
- supporting changes platform api tests
2021-02-11 13:17:00 -08:00
Volodymyr Boiko
9cd9ff72ea
[platform][barefoot] Fix sonic_platform for x86_64-accton_wedge100bf_65x-r0 (#6612)
platform modules' deb package rules for x86_64-accton_wedge100bf_65x-r0 was missing the code that installs the sonic_platform wheel package file under device directory on host (which is checked by pmon deamon on start)
2021-02-11 10:52:37 -08:00
vmittal-msft
71c5e74c42
[broadcom]: Upgrading bcmsai from 4.3.0.10-5 to 4.3.0.13 (#6767)
Merged bcmsai 4.3.0.13 code to top of master bcmsai 4.3.0.10-5.

- How to verify it
Ran nightly regression on T0 and T1 topology using bcmsai 4.3.0.13. Test results are better than previous runs.
For T0 -
New test passing - CRM, Decap, FDB, platform test, VxLAN
New test failing – PFC unknown MAC
For T1 –
New test passing – Port Channel
New test failing – platform test
2021-02-11 02:31:56 -08:00
Stepan Blyshchak
0e17525937
[Mellanox][SAI] update submodule pointer (#6729)
Include SAI bug fixes:

- Apply device MAC on port host interface when port is removed from LAG.
- [Shared Headroom]: fixed watermark handling for SHP flow
- Decrease verbosity of policer unbind message when no policer is attached

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
2021-02-10 23:13:46 -08:00
Blueve
d8fe592e2b
[Celestica][haliburton][cp210x] modprobe cp210x to ensure the driver loaded properly (#6715)
This PR is to fix issue: #6603
The CP210x driver not attached properly after first login (cold-plug), lsusb and dmesg shown that the usb devices has been recognized but driver is missing.
2021-02-10 06:15:13 -08:00
Arun Saravanan Balachandran
8ec747f2eb
Dell S6100: Watchdog - Fix Python3 incompatibility (#6734)
To make watchdog.arm() method python3 compatible in DellEMC S6100.
2021-02-10 06:13:24 -08:00
Joe LeVeque
7ea0d9e27a
[sonic-platform-common] Update submodule (#6742)
Submodule commits included:

* src/sonic-platform-common 6ad0004...bd4dc03 (1):
  > [sonic_sfp/qsfp_dd.py] Update DOM capability method name to align with other drivers (#163)

Also align all calling function names to match.
2021-02-10 06:12:49 -08:00
Tamer Ahmed
149a68b956
[syncd-rpc] Install Libboost Atomic 1.71, Libqtcore And Libqtnetwork (#6689)
When Building syncd-rpc, libthrift has dependency on libboost-atomic1.71.0,
however the debian packager install version 1.67 instead. This PR
preinstalls libboost-atomic v 1.71 to avoid falling back to v 1.67.

signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
2021-02-10 02:26:31 -08:00
jostar-yang
c54a03fade
[as7312-54x] Support platform API2.0 (#6272)
Add platform 2.0 support for Accton as7312-54x platform
2021-02-09 10:02:09 -08:00
lguohan
cea8c1895e
[saibcm-modules]: match linux kernel version (#6732)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-02-09 08:48:23 -08:00
Arun Saravanan Balachandran
3015de1dd0
[sonic-host-service] Move to sonic-host-services package (#6273)
- Why I did it

To move ‘sonic-host-service’ which is currently built as a separate package to ‘sonic-host-services' package. 

- How I did it

- Moved 'sonic-host-server' to 'src/sonic-host-services' and included it as part of the python3 wheel.
- Other files were moved to 'src/sonic-host-services-data' and included as part of the deb package.
- Changed build option ‘INCLUDE_HOST_SERVICE’ to ‘ENABLE_HOST_SERVICE_ON_START’ for enabling sonic-hostservice at boot-up by default.
2021-02-08 19:35:08 -08:00
vmittal-msft
1d99d14edf
[broadcom]: BRCM SAI 4.3.0.10-5 : Fix for ACL entry set attribute for IN_PORTS for TD3 (#6718)
ACL entry set attribute updates all the entries in the table. The correct behavior is to set the attribute on single entry.

- How I did it
Current SDK code, while setting the new attribute, is going through all the entries and updating it. Added a logic to check for requested entry and only allow for that ACL entry.
A case has filed with BRCM. Once an official fix is provided by BRCM, we will then remove this in house fix and apply the official fix.
2021-02-08 08:07:33 -08:00
lguohan
de51ee33df
[syncd-vs]: remove hardcode version for iproute2 and libcap2-bin (#6713)
Fix #6711 

the requirement was introduced in commit 75104bb35d
to support sflow in stretch build. in buster build, the requirement
is met, no need to pin down the version.

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-02-07 19:51:22 -08:00
Junchao-Mellanox
6d4c20efb1
Fix dynamic minimum fan table issue caused by python3 (#6690)
**- Why I did it**
After migrating to python3, the operator '/' always get a float result, but it gets integer result in python2. Need fix this in thermal_conditions.

**- How I did it**
1. cast float value to int
2. change the unit test case to cover this situation

**- How to verify it**
Manually test and regression test
2021-02-07 11:21:44 +02:00
lguohan
834347b8f7
[sonic-linux-kernel]: security update to kernel 4.19.152 (#6490)
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-02-06 21:02:06 -08:00
Roy Lee
b6a6c0c6b2
[device/accton/as4630-54pe] Fix accton driver not been installed (#6321)
Accton util applies lsmod to check if drivers are installed.
But lsmod may return error on startup and skip module installation.

Signed-off-by: roy_lee <roy_lee@edge-core.com>
2021-02-06 13:56:16 -08:00
Aravind Mani
c6085c6e1b
[DellEMC Z9332f] Added support for platform system health daemon (#6642) 2021-02-06 13:53:35 -08:00
Volodymyr Boiko
3f2a493c14
[barefoot][platform] Fix sonic-platform host installation (#6696)
prerm is needed for platform modules package to be properly removed.
Added prerm to remove installed in postinst wheel packages.

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-06 11:33:06 -08:00
Joe LeVeque
18f2c5cfdd
[platform] Update QSFP method name 'parse_qsfp_dom_capability' -> 'parse_dom_capability' (#6695)
**- Why I did it**
PR https://github.com/Azure/sonic-platform-common/pull/102 modified the name of the SFF-8436 (QSFP) method to align the method name between all drivers, renaming it from `parse_qsfp_dom_capability` to `parse_dom_capability`. Once the submodule was updated, the callers using the old nomenclature broke. This PR updates all callers to use the new naming convention.

**- How I did it**

Update the name of the function globally for all calls into the SFF-8436 driver.

Note that the QSFP-DD driver still uses the old nomenclature and should be modified similarly. I will open a PR to handle this separately.
2021-02-05 14:41:05 -08:00
Arun Saravanan Balachandran
fa89c6dd8f
DellEMC: S6100, S6000 - Enable thermalctld, Platform API implementation and fixes (#6438)
**- Why I did it**

To incorporate the below changes in DellEMC S6100, S6000 platforms.

- S6100, S6000:
    - Enable 'thermalctld'
    - Implement DeviceBase methods (presence, status, model, serial) for Fantray and Component
    - Implement ‘get_position_in_parent’, ‘is_replaceable’ methods for all device types
    - Implement ‘get_status’ method for Fantray
    - Implement ‘get_temperature’, ‘get_temperature_high_threshold’, ‘get_voltage_high_threshold’, ‘get_voltage_low_threshold’ methods for PSU
    - Implement ‘get_status_led’, ‘set_status_led’ methods for Chassis
    - SFP:
        - Make EEPROM read both Python2 and Python3 compatible
        - Fix ‘get_tx_disable_channel’ method’s return type
        - Implement ‘tx_disable’, ‘tx_disable_channel’ and ‘set_power_override’ methods
- S6000:
    - Move PSU thermal sensors from Chassis to respective PSU
    - Make available the data of both Fans present in each Fantray


**- How I did it**

- Remove 'skip_thermalctld:true' in pmon_daemon_control.json
- Implement the platform API methods in the respective device files
- Use `bytearray` for data read from transceiver EEPROM 
- Change return type of 'get_tx_disable_channel' to match specification in sonic_platform_common/sfp_base.py
2021-02-05 12:30:08 -08:00
Lior Avramov
f76926add3
[Mellanox] Update FW upgrade script to use 'mlxfwmanager -d' option for specifying MST device in FW burn operation (#6541)
**- Why I did it**
Reduce the time it takes for the ASIC FW burn as part of the automatic FW upgrade procedure.

**- How I did it**
Add -d option to mlxfwmanager tool to use the faster MST device and not the default one which is not the fastest one.

**- How to verify it**
I manually changed ASIC FW followed by reboot command in order for FW upgrade to take place on deinit.
I manually changed ASIC FW followed by hard reset in order for FW upgrade to take place on init.

Signed-off-by: liora <liora@nvidia.com>
2021-02-04 19:44:16 +02:00
xumia
19ccba4d05
[build]: Fix syncd dpkg cache dependency issue (#6680)
* Fix syncd dpkg cache dependency issue
2021-02-04 09:03:14 -08:00
Eran Dahan
984c1cd209
[MLNX] update SAI submodule to include fix for debug dump (#6667)
**Why I did it**
Disable SDK extended dump due to issue found

**How I did it**
Update SAI submodule

**How to verify it**
Verify the SDK extended dump is not called.

Signed-off-by: Eran Dahan <erand@nvidia.com>
2021-02-04 09:12:28 +02:00
gechiang
f00588855d
BRCM SAI 4.3.0.10-4 Fix _brcm_sai_indexed_data_get () with unexpected queue causing _brcm_sai_switch_assert () after warm reboot (#6664) 2021-02-03 15:59:56 -08:00
Volodymyr Boiko
f8ddc39adb
[platform][barefoot] Install sonic_platform to host (#6644)
- Why I did it
SONiC design requires sonic_platform package to be installed in SONiC host environment, not only in docker containers.

- How I did it
For now, sonic_platform python wheel package, that is used by pmon, is provided via device-specific platform modules deb packages that unpacks the wheel package file into specific device's directory on lazy-install.
The PR makes deb packages' postinst script also install these unpacked wheel packages to host.

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-02-02 16:19:43 -08:00
gechiang
7928fbf36b
[broadcom]: broadcom sai update to 4.3.0.10-3 (#6620)
1. BRCM SAI Debian build need not have any Kernel version dependency - Starting with 4.3 BRCM made changes in SAI so that this dependency has been cleaned up. We can now remove the Kernel Version dependency from Azure Pipeline build script.

2. Bypass PEER_MODE p2mp setting causing SYNCd crash on non-TD3 SKUs - Temporarily patch BRCM SAI code to not cause SYNCd crash when Orchagent program SAI_TUNNEL_ATTR_PEER_MODE: SAI_TUNNEL_PEER_MODE_P2MP on Non-TD3 SKUs. Will remove this when BRCM provide proper fix to address this issue.
2021-01-31 16:59:01 -08:00
Stephen Sun
4f50658cfc
[syncd-rpc docker] Fix issue: ptf_nn_agent isn't able to start in syncd-rpc docker on buster (#6448)
- Why I did it
Fix issue: ptf_nn_agent isn't able to start in syncd-rpc docker on buster.

- How I did it
The issue is fixed by installing python-dev, cffi and nnpy for python 2 explicitly.

- How to verify it
Run copp test on RPC image.
2021-01-31 09:11:33 +02:00
gechiang
c5d47791e8
[broadcom]: Fix BRCM Syncd Error:syncd#/supervisord: syncd sh: 1: ethtool: not found (#6615)
Starting with BRCM SAI 4.3.1.5 we see the following :ethtool not fount" error in syslog during boot up:
```
Jan 27 07:36:14.712472 str-s6100-acs-1 INFO syncd#/supervisord: syncd sh: 1:
Jan 27 07:36:14.712844 str-s6100-acs-1 INFO syncd#/supervisord: syncd ethtool: not found
Jan 27 07:36:14.713228 str-s6100-acs-1 INFO syncd#/supervisord: syncd #015
Jan 27 07:36:14.713840 str-s6100-acs-1 INFO syncd#syncd: [0] SAI_API_HOSTIF:_brcm_sai_hostif_speed_set:11894 cmd ethtool -s Ethernet39 speed 40000 rc:32512
Jan 27 07:36:14.717204 str-s6100-acs-1 NOTICE swss#orchagent: :- setHostIntfsOperStatus: Set operation status DOWN to host interface Ethernet39
Jan 27 07:36:14.717204 str-s6100-acs-1 NOTICE swss#orchagent: :- initPort: Initialized port Ethernet39
Jan 27 07:36:14.717204 str-s6100-acs-1 NOTICE swss#orchagent: :- initializePort: Initializing port alias:Ethernet36 pid:1000000000040
Jan 27 07:36:14.726793 str-s6100-acs-1 NOTICE swss#portsyncd: :- onMsg: nlmsg type:16 key:Ethernet36 admin:0 oper:0 addr:4c:76:25:f5:48:80 ifindex:75 master:0
Jan 27 07:36:14.727967 str-s6100-acs-1 NOTICE swss#portsyncd: :- onMsg: Publish Ethernet36(ok) to state db
Jan 27 07:36:14.729331 str-s6100-acs-1 NOTICE swss#orchagent: :- addHostIntfs: Create host interface for port Ethernet36
Jan 27 07:36:14.752398 str-s6100-acs-1 INFO syncd#/supervisord: syncd sh: 1: ethtool: not found#015
Jan 27 07:36:14.752689 str-s6100-acs-1 INFO syncd#syncd: [0] SAI_API_HOSTIF:_brcm_sai_hostif_speed_set:11894 cmd ethtool -s Ethernet36 speed 40000 rc:32512
Jan 27 07:36:14.756050 str-s6100-acs-1 NOTICE swss#orchagent: :- setHostIntfsOperStatus: Set operation status DOWN to host interface Ethernet36
Jan 27 07:36:14.757585 str-s6100-acs-1 NOTICE swss#orchagent: :- initPort: Initialized port Ethernet36
```
It seems that starting with BRCM SAI 4.2.1.5 syncd is using ethtool to set the host interface speed and since this ethtool was not part of the syncd Docker, we observe these "ethtool not found" issue.
2021-01-30 05:28:33 -08:00
Volodymyr Boiko
481870670d
[barefoot][platform] platform API 2.0 fixes (#6607)
To improve python3 support of berefoot's sonic_platform

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-01-29 17:29:37 -08:00
Joe LeVeque
5985d949fa
[docker-sonic-vs] Install sonic-platform-common package (#6587)
**- Why I did it**

sonic-utilities will become dependent upon sonic-platform-common as of https://github.com/Azure/sonic-utilities/pull/1386.

**- How I did it**

- Add sonic-platform-common as a dependency in docker-sonic-vs.mk
- Additionally, no longer install Python 2 packages of swsssdk and sonic-py-common, as they should no longer be needed.
2021-01-28 09:44:43 -08:00
Mahesh Maddikayala
f6b842edd3
[BCMSAI] Update BCMSAI debian to 4.3.0.10 with 6.5.21 SDK, and opennsl module to 6.5.21 (#6526)
BCMSAI 4.3.0.10, 6.5.21 SDK release with enhancements and fixes for vxlan, TD3 MMU, TD4-X9 EA support, etc.
2021-01-28 08:38:47 -08:00
Kebo Liu
7f222e7bc1
[mellanox]: Update SAI to sonic2012 1.18.1.0 (#6566)
Changes in the new release:

1. Policy based hashing optimization
2. New attribute support for Max port headroom
3. Tunnel ECN map fixes
4. Tunnel EVPN skeleton extensions (peer attrib, maps)
5. Bridge port admin not affecting port admin (optimize port down time)
6. CRM new API for neighbors and tunnel termination entries
7. Improve FDB event for flush by bridge port (before, null bridge was reported to SONiC, now the bridge will be extracted from bridge port)
8. DHCP L2 v4+v6 traps (for ZTP use case)
9. Generic counter implementation

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-01-27 12:29:28 -08:00
Guohan Lu
044efe72ca [build]: add _BUILD_ENV to specify env for dpkg-buildpackage
Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-27 08:28:21 -08:00
Guohan Lu
ca0e8cbe0e [docker-ptf]: build docker ptf
- combine docker-ptf-saithrift into docker-ptf docker
- build docker-ptf under platform vs
- remove docker-ptf for other platforms

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-27 08:28:21 -08:00
Kebo Liu
9ff56445c9
Add hw-mgmt patch to support SDK OFFLINE event for handling flow within service firmware upgrade (#6550)
During ISSU, "mlxsw_minimal" driver still trying to access firmware, in some cases FW could return some wrong critical threshold value which will cause switch shutdown.

**- How I did it**
In order to prevent "mlxsw_minimal" driver from accessing ASIC during ISSU, SDK will raise "OFFLINE" 'udev' event
at the early beginning of such flow. When this event is received, hw-management will remove "mlxsw_minimal" driver.
There is no need to implement the opposite "ONLINE" event since this flow is ended up with "kexec".

**- How to verify it**
repeatedly perform warm reboot, make sure there is no switch shutdown occurred.
2021-01-27 15:39:54 +02:00
Kebo Liu
84985e103d
[mellanox]: Update SDK to 4.4.2308, FW to *.2008.2308 (#6552)
Bugs fixes:
    All | Kernel | During system reload when CPU is loaded with heavy traffic, a Kernel Panic may occur.
    All | Modules, Port split | FW stuck when device rebooted with locked Optical Transceivers in split mode
    Spectrum-3 | PFC | On Spectrum-3 systems, slow reaction time to Rx pause packets on 40GbE ports may lead to buffer overflow on servers.
    Spectrum-3 | SN4700, Port Split | On rare occasion SN4700, conducting 100G split (4x25G) in NRZ when splitter port 1 or 2 are down, ports 3 and 4 will also go down.

Enahncments:
    All | Kernel | new notification on ISSU start, so other kernel drivers can disable any interface to ASIC

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-01-25 10:52:22 -08:00
Guohan Lu
4b5212b8b2 [vstest]: add default vs test
Check #6483

add test to make sure default route change in eth0 does not
affect the default route in the default vrf

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-24 22:25:11 -08:00
Antonina Melnyk
da7f80d70b
[barefoot] Fixes for platform API (#6487)
There was a mismatch with Eeprom class methods names and methods called from Eeprom class.

Signed-off-by: Antonina Melnyk antoninax.melnyk@intel.com
2021-01-24 16:32:18 -08:00
Danny Allen
ef6a05f07e
[DellEMC Z9332f] Remove duplicate ipmihelper.py script (#6536)
Fixes #6445

Because the ipmihelper.py script in the 9332 folder is slightly different than the common one (due to LGTM fixes), when the common one gets copied during build time it causes the workspace/build to become dirty.

Signed-off-by: Danny Allen <daall@microsoft.com>
2021-01-23 00:26:46 -08:00
yozhao101
be3c036794
[supervisord] Monitoring the critical processes with supervisord. (#6242)
- Why I did it
Initially, we used Monit to monitor critical processes in each container. If one of critical processes was not running
or crashed due to some reasons, then Monit will write an alerting message into syslog periodically. If we add a new process
in a container, the corresponding Monti configuration file will also need to update. It is a little hard for maintenance.

Currently we employed event listener of Supervisod to do this monitoring. Since processes in each container are managed by
Supervisord, we can only focus on the logic of monitoring.

- How I did it
We borrowed the event listener of Supervisord to monitor critical processes in containers. The event listener will take
following steps if it was notified one of critical processes exited unexpectedly:

The event listener will first check whether the auto-restart mechanism was enabled for this container or not. If auto-restart mechanism was enabled, event listener will kill the Supervisord process, which should cause the container to exit and subsequently get restarted.

If auto-restart mechanism was not enabled for this contianer, the event listener will enter a loop which will first sleep 1 minute and then check whether the process is running. If yes, the event listener exits. If no, an alerting message will be written into syslog.

- How to verify it
First, we need checked whether the auto-restart mechanism of a container was enabled or not by running the command show feature status. If enabled, one critical process should be selected and killed manually, then we need check whether the container will be restarted or not.

Second, we can disable the auto-restart mechanism if it was enabled at step 1 by running the commnad sudo config feature autorestart <container_name> disabled. Then one critical process should be selected and killed. After that, we will see the alerting message which will appear in the syslog every 1 minute.

- Which release branch to backport (provide reason below if selected)

 201811
 201911
[x ] 202006
2021-01-21 12:57:49 -08:00
Qi Luo
3c16f80382
sonic-config-engine uses libswsscommon instead of swsssdk (#6406)
**- Why I did it**
swsssdk will be deprecated. Migrate sonic-config-engine to use libswsscommon library instead

**- How to verify it**
Unit test
2021-01-20 12:06:08 -08:00
lguohan
755c73797c
[mellanox]: fix mellanox hw-management build (#6471)
use dpkg-buildpackage build with fakeroot

Signed-off-by: Guohan Lu <lguohan@gmail.com>
2021-01-18 13:10:27 -08:00
Kebo Liu
4cf9316ec3
[Mellanox] Make determine-reboot-cause service start after hw-management service (#6465)
**- Why I did it**

On the Mellanox platform, reboot cause is fetched from some certain sysfs which is created by the hw-management service. So determine-reboot-cause service shall start after hw-management, otherwise it could fail due to the related sysfs is not available yet.

**- How I did it**

Add a patch to the hw-management service to make sure determine-reboot-cause service should start after it.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-01-15 11:38:31 -08:00
Wirut Getbamrung
0ca343422d
[device/celestica]: Add thermalctld support on DX010 platform APIs (#6089)
**- Why I did it**
- The thermalctld daemon on the Pmon docker requires support from the thermal manager API.

**- How I did it**
- Removed the old function for detecting a faulty fan.
- Removed the old function for detecting excess temperature.
- Implement thermal_manager APIs based on ThermalManagerBase
- Implement thermal_conditions APIs based on ThermalPolicyConditionBase
- Implement thermal_actions APIs based on ThermalPolicyActionBase
- Implement thermal_info APIs based on ThermalPolicyInfoBase
- Add thermal_policy.json
2021-01-15 10:20:47 -08:00
Roy Lee
c9d3e25115
[device/accton]: As7816-64x, fix memory leakage on accton fan monitor. (#6168)
It's been reported that accton fan monitor process keeps consuming memory after few days.
The amount of memory occupied increases in linear and never leased.

Signed-off-by: roy_lee <roy_lee@edge-core.com>
2021-01-15 08:06:21 -08:00
Kebo Liu
1b2980540d
[mellanox][platform api] fix a missing import time module (#6458)
“time" module was missed to be imported and will cause an error when the branch hit.

Signed-off-by: Kebo Liu <kebol@nvidia.com>
2021-01-15 08:01:11 -08:00
Kalimuthu-Velappan
18350a5dd9
[build]: Fix for missing dependencies in the DPKG framework (#6393)
1. Fixes the missing DPKG file for gbsyncd-vs package
2. Fixes the softlink issue on the Platform-common and ztp package
3. Fixes the PYTHNON_DEBS list is missing for DBG dockers.
2021-01-13 10:32:42 -08:00
Junchao-Mellanox
0a49edb68e
[Mellanox] Fix issue: need import initialize_sdk_handle in get_sdk_handle (#6435)
Found test_sfp.py failed due to use a method without importing it.
2021-01-13 09:42:04 -08:00
dflynn-Nokia
674fac21c1
[Nokia ixs7215] Add SW assist for platform entropy & fix inband mgmt support (#6417)
- Improve random number generation during early Sonic initialization by providing SW updates to Linux entropy value.
- Improve handling of platform In-Band management port

This commit provides the following updates to the Nokia ixs7215 platform

1. The Marvell Armada-38x SOC requires SW assistance to improve the system
   entropy value available early on in the Sonic boot sequence.
2. The Nokia ixs7215 platform does not have a dedicated Out-Of-Band (OOB) mgmt
   port and thus requires additional logic to optionally support configuring
   front panel port 48 as an In-Band mgmt port. This commit provides additional
   logic to manage and maintain the operation of this In-Band mgmt port.
2021-01-12 16:59:42 -08:00
carl-nokia
380edf054d
[Platform][nokia]: python3-smbus package add with python3 and jinja fixes (#6416)
fix platform driver breakage due to python3 upgrade and fix load minigraph errors with config load_minigraph -y

**- How I did it**
added python3-smbus to the pmon docker template since the previous was python2 specific 
fixed additional "ord" python2 specific code 
fixed the jinja templates used by qos reload - the template logic required data to be parsed 

**- How to verify it**
run "show platform XXX" commands and verify output
run "sudo config load_minigraph -y" and verify configuration 
run "show interfaces XXX" and verify output 

Co-authored-by: Carl Keene <keene@nokia.com>
2021-01-12 15:05:06 -08:00