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

SSD Health: Retrieve SSD health and temperature values from generic S… #229

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

dflynn-Nokia
Copy link
Contributor

…SD info

The problem:
The current SSD health API uses a SSD vendor specific utility to retrieve
values for overall SSD health and internal SSD temperature. These utilities
are typically made available only in binary form and are not always
available for all platform architectures (amd64, arm64, armhf, etc.)
Vendor licensing agreements can prevent the inclusion of utility source
code in the Sonic build.

The solution presented here is to retrieve SSD health and temperature values
from the generic SSD info retrieved via the open-source smartmontools utility
(smartctl). These values can be overwritten with values retrieved using a
vendor specific utility when available. smartmontools is already included in
the Sonic source tree and is being built for all platform architectures.

Description

Provide SSD health and temperature values for all platform architecures.

Motivation and Context

The Sonic 'show platform ssdhealth' command does not show SSD Health and Temperature values when running on ARM-based platforms.

How Has This Been Tested?

Issue 'show platform ssdhealth' command and observe values for Health and Temperature

Additional Information (Optional)

Requesting that this change, if approved, also be made available to the sonic-buildimage 202012 and 202106 branches.

…SD info

The problem:
    The current SSD health API uses a SSD vendor specific utility to retrieve
    values for overall SSD health and internal SSD temperature. These utilities
    are typically made available only in binary form and are not always
    available for all platform architectures (amd64, arm64, armhf, etc.)
    Vendor licensing agreements can prevent the inclusion of utility source
    code in the Sonic build.

The solution presented here is to retrieve SSD health and temperature values
from the generic SSD info retrieved via the open-source smartmontools utility
(smartctl). These values can be overwritten with values retrieved using a
vendor specific utility when available. smartmontools is already included in
the Sonic source tree and is being built for all platform architectures.
@dflynn-Nokia
Copy link
Contributor Author

@Blueve Hi Jing. Can you help move this one along? This will improve platform support for ixs-7215.
Thanks.

@Blueve
Copy link

Blueve commented Nov 10, 2021

@dflynn-Nokia Do we want to backport this to 202012?

@Blueve Blueve added the SSD label Nov 10, 2021
@dflynn-Nokia
Copy link
Contributor Author

Yes please, backport to 202012.

@Blueve Blueve merged commit ef55364 into sonic-net:master Nov 11, 2021
@dflynn-Nokia dflynn-Nokia deleted the ssd-health branch November 11, 2021 02:26
qiluo-msft pushed a commit that referenced this pull request Nov 15, 2021
…SD info (#229)

The problem:
    The current SSD health API uses a SSD vendor specific utility to retrieve
    values for overall SSD health and internal SSD temperature. These utilities
    are typically made available only in binary form and are not always
    available for all platform architectures (amd64, arm64, armhf, etc.)
    Vendor licensing agreements can prevent the inclusion of utility source
    code in the Sonic build.

The solution presented here is to retrieve SSD health and temperature values
from the generic SSD info retrieved via the open-source smartmontools utility
(smartctl). These values can be overwritten with values retrieved using a
vendor specific utility when available. smartmontools is already included in
the Sonic source tree and is being built for all platform architectures.
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-platform-common that referenced this pull request Oct 25, 2024
…t#229)

Added unit tests for the following methods:

y_cable_wrapper_get_transceiver_info
y_cable_wrapper_get_presence
y_cable_toggle_mux_torA
y_cable_toggle_mux_torB
format_mapping_identifier
update_appdb_port_mux_cable_response_table
update_table_mux_status_for_response_tbl
update_tor_active_side
read_y_cable_and_update_statedb_port_tbl
delete_port_from_y_cable_table
create_tables_and_insert_mux_unknown_entries
check_identifier_presencead_update_mux_table_entry
init_ports_status_for_y_cable
change_ports_status_for_y_cable_change_event
delete_ports_status_for_y_cable
get_firmware_dict
get_muxcable_info
get_muxcable_static_info
post_mux_info_to_db
task_download_firmware_worker

Motivation and Context
The motivation for these changes stems from needing to increase the unit test coverage of the y_cable_helper methods to above 50%.

How Has This Been Tested?
This was tested by building and running the new unit tests and verifying that they contribute to and increase the code coverage as reflected in the xcvrd_xcvrd_utilities_y_cable_helper_py.html page.

Co-authored-by: Ashwin Srinivasan <ashwin.srinivasan@microsoft.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