Skip to content
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

daemon: increase retry times to avoid premature returns #394

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

sctb512
Copy link
Member

@sctb512 sctb512 commented Mar 3, 2023

Currently, snapshotter retries for 2s while waiting for the nydus daemon's unix domain socket file to exist. This probably causes the nydusd_count metric to be incorrect because it returns prematurely.

This PR is addressing #392

@@ -173,7 +173,7 @@ func WaitUntilSocketExisted(sock string) error {

return nil
},
retry.Attempts(20), // totally wait for 2 seconds, should be enough
retry.Attempts(200), // totally wait for 20 seconds, should be enough
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to wait so long?

Copy link
Member Author

@sctb512 sctb512 Mar 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about 5s or 10s? 2s is too short, so snapshotter might not get the `nydusd' startup state right.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What worries me is why nydusd does not start its HTTP server after 2 seconds. It should be long enough. Extend the wait time is not a solution to the inconsistency problem. We should allow nydusd's startup failure and handle the inconsistency of metrics counting

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's fine to expand the wait time for the existence of the UNIX socket. But we still have to handle the inconsistency condition. Let's merge this PR in the first place and raise another PR to handle the inconsistency once and for all.
Let's keep the issue #392 open to trace it. 10 seconds sounds good to me 🤗

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I updated it.

Signed-off-by: Bin Tang <tangbin.bin@bytedance.com>
@sctb512 sctb512 force-pushed the fix-incorrect-nydusd-number branch from 2d50b10 to 3052215 Compare March 6, 2023 01:57
@codecov-commenter
Copy link

Codecov Report

Patch coverage has no change and project coverage change: -0.20 ⚠️

Comparison is base (2fc62a6) 28.08% compared to head (3052215) 27.88%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #394      +/-   ##
==========================================
- Coverage   28.08%   27.88%   -0.20%     
==========================================
  Files          40       40              
  Lines        4084     4077       -7     
==========================================
- Hits         1147     1137      -10     
- Misses       2798     2801       +3     
  Partials      139      139              
Impacted Files Coverage Δ
pkg/daemon/client.go 26.19% <ø> (ø)
config/config.go 28.94% <0.00%> (-4.66%) ⬇️
pkg/blob/blob_manager.go 29.59% <0.00%> (-3.07%) ⬇️
cmd/containerd-nydus-grpc/pkg/command/flags.go 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@changweige changweige left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@changweige changweige merged commit 5e6474e into containerd:main Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants