-
Notifications
You must be signed in to change notification settings - Fork 93
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
daemon: increase retry times to avoid premature returns #394
Conversation
pkg/daemon/client.go
Outdated
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 🤗
There was a problem hiding this comment.
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>
2d50b10
to
3052215
Compare
Codecov ReportPatch coverage has no change and project coverage change:
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
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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