-
Notifications
You must be signed in to change notification settings - Fork 177
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_generic]Fix ssd no model information #302
base: master
Are you sure you want to change the base?
Conversation
|
This pull request introduces 2 alerts when merging d9bcba3 into 030a382 - view on LGTM.com new alerts:
|
d9bcba3
to
e601d0e
Compare
@hantienEdgecore can you fix the build failure and the LGTM errors? |
7212d81
to
e601d0e
Compare
The ssd information can show correctly even if can't get model information in generic SSD information. When unknown model name , use Virtuim tool to get SSD Health/Temperature . How has this been Tested ? Manual testing on Edgecore switch (ex AS4630_54PE)
e601d0e
to
301287e
Compare
@hantienEdgecore What is the output of |
output of "smartctl -a /dev/sda" is like this below. root@as4630-54npe-1:/home/admin# smartctl -a /dev/sda === START OF INFORMATION SECTION === === START OF READ SMART DATA SECTION === General SMART Values: SMART Attributes Data Structure revision number: 1 SMART Error Log Version: 1 SMART Self-test log structure revision number 1 SMART Selective self-test log data structure revision number 1 |
@@ -57,8 +57,9 @@ def __init__(self, diskdev): | |||
self.fetch_vendor_ssd_info(diskdev, vendor) | |||
self.parse_vendor_ssd_info(vendor) | |||
else: | |||
# No handler registered for this disk model | |||
pass | |||
# unknown model name , use Virtium to get information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this logic to assume it will be Virtium is a hack. Is there a better way to identify the SSD vendor? We should enhance the existing logic to identify the vendor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked the information from SMARTCTL, INNODISK and VIRTIUM in the same device's SSD.
There is no information about vendor. You can see the result from smartctrl that I posted. We can only know "Device Model: TS32XBTMM1600 Serial Number: F318410050". But it can't be a logical statement because it's just a random model name or SN. and there are many this kind of ssd in my work enviorment. The only way I found to find out the correct ssd health and temperature is to use VIRTIUM cmd to check it.
…c-net#302) Signed-off-by: vaibhav-dahiya [email protected] This PR fixes a typo/error condition when read_side is not 1 or 2 or -1, for a case where NIC side is plugged into the ToR and a user configures a CLI for sudo config mux hwmode state active/standby <port>, in such a scenario we can trigger this xcvrd_config_hwmode_state_cmd_sts_tbl attribute error. Description Motivation and Context How Has This Been Tested? Unit-tests and loading the changes on Arista testbed
The ssd information can show correctly even if can't get model information in generic SSD information.
When unknown model name , use Virtuim tool to get SSD Health/Temperature .
How has this been Tested ?
Manual testing on Edgecore switch (ex AS4630_54PE and so on )
Why I did it
Some SSD (like Transcend) can't get model information form generic SSD information .
How I did it
When get no model name , use Virturm cmd to get SSD information .
How to verify it
admin@sonic:/$ sudo show platform ssdhealth --vendor
Device Model : TS32XBTMM1600
Health : 87%
Temperature : 32C
SMART attributes
ID Attribute High Raw Low Raw Value Worst Threshold
1 Raw_Read_Error_Rate 0 0 100 100 0
5 Reserved_Attribute 0 0 100 100 0
9 Power_On_Hours 0 710 100 100 0
12 Power_Cycle_Count 0 9910 100 100 0
160 Uncorrectable_Sector_Count 0 0 100 100 0
161 Valid_Spare_Block 0 55 100 100 0
163 Reserved_Attribute 0 13 100 100 0
164 Reserved_Attribute 0 418014 100 100 0
165 Maximum_Erase_Count 0 437 100 100 0
166 Reserved_Attribute 0 337 100 100 0
167 Average_Erase_Count 0 406 100 100 0
168 NAND_Endurance 0 3000 100 100 0
169 Remaining_Life_Left 0 87 100 100 0
175 Reserved_Attribute 0 0 100 100 0
176 Reserved_Attribute 0 0 100 100 0
177 Reserved_Attribute 0 208 100 100 50
178 Reserved_Attribute 0 0 100 100 0
181 Total_Program_Fail 0 0 100 100 0
182 Total_Erase_Fail 0 0 100 100 0
192 Sudden_Power_Lost_Count 0 106 100 100 0
194 Temperature_Celsius 0 32 100 100 0
195 Hardware_ECC_Recovered 0 1134 100 100 0
196 Reallocated_Event_Count 0 0 100 100 16
197 Current_Pending_Sector_Count 0 0 100 100 0
198 Reserved_Attribute 0 0 100 100 0
199 UDMA_CRC_Error_Count 0 0 100 100 50
232 Reserved_Attribute 0 100 100 100 0
241 Total_LBAs_Written 0 146660 100 100 0
242 Total_LBAs_Read 0 96506 100 100 0
245 Reserved_Attribute 0 418014 100 100 0