Open assrinivasan opened 3 months ago
/azpw run coverage.Azure.sonic-platform-daemons.build_test
/AzurePipelines run coverage.Azure.sonic-platform-daemons.build_test
@prgeor @saiarcot895 failure appears to be a false flag? Code Coverage for scripts/stormond is at 83% as of the latest commit:
assrinivasan@dev-vm:sonic-buildimage/src/sonic-platform-daemons$ git log -1 --oneline d5c5969 (HEAD -> stormon-add-last-sync-time, origin/stormon-add-last-sync-time) Increased log level so that they are seen in syslogs
Am I missing something?
Description
Currently the Storage monitoring Daemon does not provide any information on when it last synced attributes of each storage device onto the database. This PR adds new dynamic field called
last_sync_time
that shows when STORAGE_INFO fields for each disk was last synced to STATE_DB. The value is in Unix timestamp format.HLD Change PR: https://github.com/sonic-net/SONiC/pull/1784
Motivation and Context
The motivation is that this field would provide additional context in case of repeated daemon crashes scenario ending up with the daemon status =
FATAL Exited too quickly (process log may have details).
How Has This Been Tested?
Manually tested my changes on a DUT:
FATAL
scenario:Thus we can see that the storage attributes for the nvme0n1 disk have not been updated in (1724487680 - 1724486210.5309312) = 1469 seconds ~= 25 minutes.