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

[Arista] Update driver submodules #5686

Merged
merged 5 commits into from
Oct 23, 2020

Conversation

Staphylo
Copy link
Collaborator

  • Enable thermalctld support for our platforms
  • Fix Chassis.get_num_sfp which had an off by one
  • Implement read_eeprom and write_eeprom in SfpBase
  • Refactor of Psus and PsuSlots. Psus they are now detected and metadata reported
  • Improvements to modular support

@@ -43,6 +43,7 @@ $(DOCKER_PLATFORM_MONITOR)_RUN_OPT += --privileged -t
$(DOCKER_PLATFORM_MONITOR)_RUN_OPT += -v /etc/sonic:/etc/sonic:ro

# Mount Arista python library on Aboot images to be used by plugins
$(DOCKER_PLATFORM_MONITOR)_aboot_RUN_OPT += -v /run/arista:/run/arista:ro
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As part of the platform initialization, our platform library detects the hardware by performing some IO and stores this information in temporary cache files.
As of aristanetworks/sonic@b29d50b all of them are stored under /run/arista.
This currently cover platform eeproms as well as PSU metadata and essentially avoids performing IO and detection again in pmon processes. The detection mechanism being tied to the library initialization does not happen pmon which would be missing some component without the cache files. (e.g: psu temp sensors not showing up)
Codepath used by pmon processes and platform initialization: https://github.com/aristanetworks/sonic/blob/05a02d74c91fb1b91fbb4602bf8c77067da3ecf2/arista/core/psu.py#L39
Codepath used by platform initialization: https://github.com/aristanetworks/sonic/blob/05a02d74c91fb1b91fbb4602bf8c77067da3ecf2/arista/core/psu.py#L154

The idea is to later have a process that monitors for fru insertion/removal to load/unload the appropriate drivers as well as refreshing the cache files (e.g not all power supply use the same kernel driver, but a system can support multiple variants).
The bit that is still under thinking is how to restart the appropriate pmon processes that have an outdated state.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i suggest to use /var/run/platform_cache/arista to store you cache data, when you mount, just mount /var/run/platform_cache so that if other vendor has similiar ask later, we do not need to map again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that.
For now this was kept specific to the swi images with _aboot_RUN_OPT which means it was not polluting the ONIE image. I'll make the necessary changes in our driver code to use /var/run/platform_cache/<vendor> and mount /var/run/platform_cache:/var/run/platform_cache for all SONiC images.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved for now. let you work on it later.

@lguohan lguohan merged commit 5bfe37c into sonic-net:master Oct 23, 2020
jleveque pushed a commit that referenced this pull request Dec 1, 2020
Rename chip name dps1900-i2c-X-58 to pmbus-i2c-X-58 in sensors.conf for Arista 7170 due to latest updates for Arista driver submodules #5686. After these updates adapter dps1900 was renamed and sensors.conf file is not applied properly. Issue was observed started from BFN SONiC image 16.

Signed-off-by: Nazar Tkachuk <nazarx.tkachuk@intel.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
 - Enable thermalctld support for our platforms
 - Fix Chassis.get_num_sfp which had an off by one
 - Implement read_eeprom and write_eeprom in SfpBase
 - Refactor of Psus and PsuSlots. Psus they are now detected and metadata reported
 - Improvements to modular support

Co-authored-by: Zhi Yuan Carl Zhao <zyzhao@arista.com>
santhosh-kt pushed a commit to santhosh-kt/sonic-buildimage that referenced this pull request Feb 25, 2021
Rename chip name dps1900-i2c-X-58 to pmbus-i2c-X-58 in sensors.conf for Arista 7170 due to latest updates for Arista driver submodules sonic-net#5686. After these updates adapter dps1900 was renamed and sensors.conf file is not applied properly. Issue was observed started from BFN SONiC image 16.

Signed-off-by: Nazar Tkachuk <nazarx.tkachuk@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants