Lazy connect to config_db during first collect instead of during init - #406
Conversation
Signed-off-by: Hemanth Kumar Tirupati <htirupati@nvidia.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
hdwhdw
left a comment
There was a problem hiding this comment.
Just confirmed it safe since this is the default value the collect function as well. But I'll recommend creating a constant for it so we know this is the default value and not some random string.
Signed-off-by: Hemanth Kumar Tirupati <htirupati@nvidia.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
@hdwhdw thanks for the review. Addressed the concern in the new revision. Please take a look. |
|
This PR has backport request for branch(es): 202605. ---Powered by SONiC BuildBot
|
|
This PR has backport request label(s) for branch(es): 202605, but is missing required test information. Please make sure you tick the tested branch(es) in the Tested branch section and provide test evidence (e.g., 202605: <test result>) in the Test result section as well in your PR description. ---Powered by SONiC BuildBot
|
|
Cherry-pick PR to 202605: #433 |
Why I did it
Avoid reading CONFIG_DB when
sonic-hostserviceinitializes. On DPU boot, the host service can start before database files are ready, causing a transientparseDatabaseConfigerror even though artifact collection is not requested yet.Observed log:
Work item tracking
How I did it
DebugArtifactCollector.__init__.collect()call.How to verify it
tests/debug_info_test.py.sonic-hostservicebefore database readiness and verify init emits noparseDatabaseConfigerror.Which release branch to backport (provide reason below if selected)
Reason: fixes a DPU boot-time false error log.
Tested branch (Please provide the tested image version)
Description for the changelog
Lazy connect to config_db during first collect instead of during init