[stormond] Added new dynamic field 'last_sync_time' to STATE_DB #535
+45
−32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: sonic-net/SONiC#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.