Lazy connect to config_db during first collect instead of during init#406
Merged
Merged
Conversation
Signed-off-by: Hemanth Kumar Tirupati <htirupati@nvidia.com>
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
dgsudharsan
approved these changes
Jul 8, 2026
hdwhdw
approved these changes
Jul 9, 2026
hdwhdw
self-requested a review
July 9, 2026 19:21
hdwhdw
requested changes
Jul 9, 2026
hdwhdw
left a comment
Contributor
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). |
Contributor
Author
|
@hdwhdw thanks for the review. Addressed the concern in the new revision. Please take a look. |
hdwhdw
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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