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

Refactor parse_virtium_info to support new ssd model VTSM24ABXI160-BM110006 #495

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

yuazhe
Copy link
Contributor

@yuazhe yuazhe commented Sep 9, 2024

Description

The ID of "Remaining Life Left" attribute on 'Virtium VTSM24ABXI160-BM110006' device is 231.
However, it is not recognized by SmartCmd nor smartctl so far so we need to parse it using the ID number.
Also add a unit for this model

Motivation and Context

The Virtium prefix of the device model is shown from smartctl output, so keep it.

How Has This Been Tested?

unit test and real hardware test
show platform ssdhealth
Device Model : Virtium VTSM24ABXI160-BM110006
Health : 100.0%
Temperature : 52C

Additional Information (Optional)

@yuazhe yuazhe requested a review from keboliu September 9, 2024 02:35
@yuazhe yuazhe marked this pull request as draft September 9, 2024 02:40
@yuazhe yuazhe force-pushed the new_ssd_model branch 3 times, most recently from 33f4ea7 to 05dadd1 Compare September 9, 2024 04:47
@assrinivasan
Copy link
Contributor

Consider:

Refactor this function so that:

first check if current disk is one of the special Virtium SSD models, if so:

parse attribute 231 directly and exit

else (all other Virtium models) :

check for presence of NAND endurance and Avg erase count in the output

if present: get health that way
else: health = N/A

What do you think?

@yuazhe yuazhe marked this pull request as ready for review September 9, 2024 09:03
Virtirum ssd has two specical model which health need to be read from
231 rather than 'Remaining_Life_Left'

Signed-off-by: Yuanzhe, Liu <[email protected]>
@yuazhe yuazhe changed the title Support new ssd model Virtium VTSM24ABXI160-BM110006 Refactor parse_virtium_info to support new ssd model Virtium VTSM24ABXI160-BM110006 Sep 18, 2024
@yuazhe yuazhe changed the title Refactor parse_virtium_info to support new ssd model Virtium VTSM24ABXI160-BM110006 Refactor parse_virtium_info to support new ssd model VTSM24ABXI160-BM110006 Sep 18, 2024
@yuazhe
Copy link
Contributor Author

yuazhe commented Sep 18, 2024

Consider:

Refactor this function so that:

first check if current disk is one of the special Virtium SSD models, if so:

parse attribute 231 directly and exit

else (all other Virtium models) :

check for presence of NAND endurance and Avg erase count in the output

if present: get health that way else: health = N/A

What do you think?

LGTM, I had rework the pr as you suggested, please help to review :-)

@keboliu
Copy link
Collaborator

keboliu commented Sep 19, 2024

@assrinivasan would you please review the new changes?

@assrinivasan
Copy link
Contributor

assrinivasan commented Sep 19, 2024

Changes LGTM. @prgeor please help review/merge. Thanks!

@yuazhe yuazhe requested a review from prgeor September 23, 2024 05:38
@liat-grozovik
Copy link
Collaborator

@prgeor kindly reminder to review

@keboliu keboliu merged commit 912ceb3 into sonic-net:master Oct 23, 2024
5 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-platform-common that referenced this pull request Nov 15, 2024
Virtirum ssd has two specical model which health need to be read from
231 rather than 'Remaining_Life_Left'

Signed-off-by: Yuanzhe, Liu <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #516

mssonicbld pushed a commit that referenced this pull request Nov 15, 2024
Virtirum ssd has two specical model which health need to be read from
231 rather than 'Remaining_Life_Left'

Signed-off-by: Yuanzhe, Liu <[email protected]>
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.

6 participants