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

bug: could not pick infinite rate limit #2400

Open
cutecutecat opened this issue May 29, 2023 · 0 comments
Open

bug: could not pick infinite rate limit #2400

cutecutecat opened this issue May 29, 2023 · 0 comments
Labels

Comments

@cutecutecat
Copy link
Contributor

Bug report:

https://github.com/dragonflyoss/Dragonfly2/blob/2b5b96b525ff46dc154637722371818b5a629c3b/cmd/dfget/cmd/root.go#L143
says

The downloading network bandwidth limit per second in format of G(B)/g/M(B)/m/K(B)/k/B, pure number will be parsed as Byte, 0 is infinite

but rateLimit = 0 is invalid, it would trigger:

Error: rate limit must be greater than 20.0MB
2023-05-29T01:52:11.348Z        ERROR   cmd/root.go:121 rate limit must be greater than 20.0MB
d7y.io/dragonfly/v2/cmd/dfget/cmd.Execute
        /go/src/d7y.io/dragonfly/v2/cmd/dfget/cmd/root.go:121
main.main
        /go/src/d7y.io/dragonfly/v2/cmd/dfget/main.go:24
runtime.main
        /usr/local/go/src/runtime/proc.go:250

Expected behavior:

dfget works with infinite rate limit.

How to reproduce it:

ditto

Environment:

  • Dragonfly version: v2.1.0-alpha.6
  • OS: container-optimized os
  • Kernel (e.g. uname -a): Linux XXX + 1 SMP Wed Mar 1 10:08:26 UTC 2023 x86_64 Intel(R) Xeon(R) CPU @ 3.10GHz GenuineIntel GNU/Linux
  • Others:

This error is caused by #1392 side effects, and 0 would be opt-out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant