-
Notifications
You must be signed in to change notification settings - Fork 163
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
[stormond] Added new dynamic field 'last_sync_time' to STATE_DB #535
[stormond] Added new dynamic field 'last_sync_time' to STATE_DB #535
Conversation
… for disk was last synced to STATE_DB
/azpw run coverage.Azure.sonic-platform-daemons.build_test |
/AzurePipelines run coverage.Azure.sonic-platform-daemons.build_test |
No pipelines are associated with this pull request. |
@prgeor @saiarcot895 failure appears to be a false flag? Code Coverage for scripts/stormond is at 83% as of the latest commit:
Am I missing something? EDIT: I was indeed missing something. Increased code coverage in latest commit. |
…c-net#535) * Added new dynamic field 'last_sync_time' that shows when STORAGE_INFO for disk was last synced to STATE_DB * Moved 'start' message to actual starting point of the daemon * Added functions for formatted and epoch time for user friendly time display * Made changes per prgeor review comments * Pivot to SysLogger for all logging * Increased log level so that they are seen in syslogs * Code coverage improvement
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.