Commit Graph

181 Commits

Author SHA1 Message Date
Samuel Angebault
6c6bfde24e
[202106][Arista] Update platform library submodules (#8643)
Update 202106 release with the Arista drivers from master.
This update is mostly targeted at chassis and is deemed stable.

Most notable chassis improvements:
 - fix psu reporting in platform api
 - powercycle fabrics on supervisor reboot
 - improve card powercycle reliability
 - fix led plugin when dealing with `Ethernet-Rec` and `Ethernet-IB`
 - fix system-health cli reporting
 - unset provisioning mode once the linecard has started
 - fix `show version` when running as `admin`
 - fix race between loading the eeprom module and sysfs file availablity
 - implement `get_all_asics` platform API
2021-09-01 23:23:11 -07:00
Volodymyr Boiko
3b451b7e12
[barefoot][platform] Chassis.get_reboot_cause (#7794)
To fix determine-reboot-cause service which was failing due to non-implemented thrown from get_reboot_case, if the reboot was done with `sudo reboot` (cold reboot)

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-06-11 13:30:03 -07:00
yozhao101
1a3cab43ac
[Monit] Deprecate the feature of monitoring the critical processes by Monit (#7676)
Signed-off-by: Yong Zhao yozhao@microsoft.com

Why I did it
Currently we leveraged the Supervisor to monitor the running status of critical processes in each container and it is more reliable and flexible than doing the monitoring by Monit. So we removed the functionality of monitoring the critical processes by Monit.

How I did it
I removed the script process_checker and corresponding Monit configuration entries of critical processes.

How to verify it
I verified this on the device str-7260cx3-acs-1.
2021-06-04 10:16:53 -07:00
Volodymyr Boiko
9d05077431
[barefoot][platform] Refactor chassis.py (#7704)
#### Why I did it
On our platforms syncd must be up while using the sonic_platform.
The issue is warm-reboot script first disables syncd then instantiate Chassis, which tries to connect syncd in __init__.

#### How I did it
Refactor Chassis to lazy initialize components.

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-06-04 09:48:57 -07:00
Volodymyr Boiko
90a457a3a0
[barefoot][sonic-platform] Fix Fan.set_speed (#7763)
Fixed typo

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-06-01 09:38:54 -07:00
andywongarista
ba6b5258f5
[Arista] Update platform drivers submodules (#7711)
- Fix `thermal.get_position_in_parent` issue which causes test_snmp_phy_entity failure
- Add support for xcvr thermal info so that thermalctld can incorporate it into the cooling algorithm (QSFP and OSFP/QSFP-DD modules only)
- Add improvements to `arista` CLI
2021-05-26 14:21:51 -07:00
Volodymyr Boiko
0fa024883d
[platform][barefoot] Add Psu.get_name (#7717)
#### Why I did it
To fix the following:
```
# psuutil status
Traceback (most recent call last):
  File "/usr/local/bin/psuutil", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/dist-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/psuutil/main.py", line 93, in status
    psu_name = psu.get_name()
  File "/usr/local/lib/python3.7/dist-packages/sonic_platform_base/device_base.py", line 28, in get_name
    raise NotImplementedError
NotImplementedError
```
#### How I did it
Implemented get_name

Signed-off-by: Volodymyr Boyko <volodymyrx.boiko@intel.com>
2021-05-26 12:02:46 -07:00
Samuel Angebault
2803fafe04
[Arista] Update platform driver submodules (#7561)
- Fix sonic_platform api "memory leak" tied to recurring allocation. fixes #7515
- Add arista clis to read chassis eeproms
2021-05-08 10:32:33 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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
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
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
Samuel Angebault
1498408ce7
[Arista] Update driver submodules (#6396)
- Cleanup and Refactor of library internals, logic mostly unchanged.
 - Enhance debugability with `arista dump` and `arista diag` commands.
 - Fix power supply detection issue.
2021-01-10 07:42:56 -08:00
Myron Sosyak
9006b961b7
[BFN] Convert platform modules to python 3 (#6347)
Fix syntax errors during xcvrd start with Python 3 daemons
2021-01-04 15:00:48 -08:00
Denys Petryshyn
9e57f5157e
[BFN] Upgrade docker-syncd-bfn to buster (#6345)
* Add changes to allow migration of bfn syncd to buster

* Update BFN packages for Debian 10

Signed-off-by: Denys Petryshyn <denysx.petryshyn@intel.com>
2021-01-04 10:38:53 -08:00
Andriy Kokhan
94e143cebe
[BFN] Updated SAI headers to v1.7.1 (#6294)
Signed-off-by: Andriy Kokhan <andriyx.kokhan@intel.com>

Co-authored-by: Andriy Kokhan <andriyx.kokhan@intel.com>
2020-12-24 18:45:41 -08:00
Samuel Angebault
44f4c2ed66
[Arista] Update driver submodules (#6151)
- Enhance eeprom parsing robustness on corrupted fields
 - Add chassis provisioning service
 - Disable CPU sleep state on some systems
 - Complete refactor for FanSlots
 - Fix module unload while still in use
2020-12-08 11:17:28 -08:00
Dmytro Shevchuk
026f0ec3fb
[Barefoot]: fix unresolved SFP type on Newport/Montara (#6063)
Fix `show interface status` and `sfpshow eeprom` commands showing incorrect information on Newport/Montara platforms
2020-12-04 11:00:03 -08:00