Fixed bug within parse_generic_ssd_info() function in Ssdutil class that would overwrite disk_io_reads, disk_io_writes and reserved_blocks information for NVMe disks with N/A after successfully parsing said values. This is due to an indentation bug and has been fixed as part of this commit.
Ran image containing these changes on a device with an NVMe disk and verified that storage disk attributes were getting successfully parsed and updated to STATE_DB.
[root@str3-7060x6-64pe-2:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 386.4M 0 loop
loop1 7:1 0 4G 0 loop /var/log
nvme0n1 259:0 0 223.6G 0 disk
├─nvme0n1p1 259:1 0 223.5G 0 part /boot
│ /var/lib/docker
│ /host
├─nvme0n1p2 259:2 0 64M 0 part
└─nvme0n1p3 259:3 0 1M 0 part
Syslogs:
2024 Aug 24 07:55:50.392206 str3-7060x6-64pe-2 INFO pmon#stormond[906]: Starting Storage Monitoring Daemon
2024 Aug 24 07:55:50.437050 str3-7060x6-64pe-2 INFO pmon#stormond[906]: Storage Device: nvme0n1, Device Model: ATP AF240GSTJA-AW1, Serial: 23090240-000257
2024 Aug 24 07:55:50.437789 str3-7060x6-64pe-2 INFO pmon#stormond[906]: Polling Interval set to 60 seconds
2024 Aug 24 07:55:50.437789 str3-7060x6-64pe-2 INFO pmon#stormond[906]: FSIO JSON file Interval set to 360 seconds
2024 Aug 24 07:55:50.481670 str3-7060x6-64pe-2 INFO pmon#stormond[906]: Storage Device: nvme0n1, Firmware: 42A4SB6G, health: 100.0%, Temp: 27.0C, FS IO Reads: 95432, FS IO Writes: 18860
2024 Aug 24 07:55:50.481837 str3-7060x6-64pe-2 INFO pmon#stormond[906]: Latest FSIO Reads: 95432, Latest FSIO Writes: 18860
2024 Aug 24 07:55:50.481837 str3-7060x6-64pe-2 INFO pmon#stormond[906]: Disk IO Reads: 3,657,918 [1.87 TB], Disk IO Writes: 1,155,355 [591 GB], Reserved Blocks: 100.0
2024 Aug 24 07:56:00.045910 str3-7060x6-64pe-2 INFO pmon#supervisord 2024-08-24 07:56:00,044 INFO success: stormond entered RUNNING state, process has stayed up for > than 10 seconds (startsecs)
Description
N/A
after successfully parsing said values. This is due to an indentation bug and has been fixed as part of this commit.Motivation and Context
This PR is in line with promised future work on the Storage Monitoring Daemon. It adds support for devices with NVMe storage disks.
Needs to be merged only after https://github.com/sonic-net/sonic-buildimage/pull/20053 is merged to master+202405 branches.
How Has This Been Tested?
NVMe
Ran image containing these changes on a device with an NVMe disk and verified that storage disk attributes were getting successfully parsed and updated to
STATE_DB
.Syslogs:
STATE_DB:
eUSB
Syslogs:
STATE_DB:
Additional Information (Optional)