-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Revert "Added API to set ephemeral port allocator range." #43066
Conversation
abbf0c0
to
0cbc1f3
Compare
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.
This looks really clean from a revert/application standpoint. However, I do wonder if it is desirable to reintroduce the ability to set the range over the API in a way that is documented and falls back to the kernel parameter as a default?
Regardless, this is aligned with the documented behavior and the right move given this has manifested as a regression for users.
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.
I was worried that the removal of OptionDynamicPortRange
would be a problem, but it looks like it was only ever used in #40055 (which is still unmerged). 👍
(This needs a rebase for some conflicts, but they look like they're pretty minor -- just the |
Since commit 2c4a868, Docker doesn't use the value of net.ipv4.ip_local_port_range when choosing an ephemeral port. This change reverts back to the previous behavior. Fixes moby#43054. Signed-off-by: Albin Kerouanton <albinker@gmail.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
logrus.WithError(err).Infof("falling back to default port range %d-%d", defaultPortRangeStart, defaultPortRangeEnd) | ||
start, end = defaultPortRangeStart, defaultPortRangeEnd | ||
logrus.WithError(err).Infof("falling back to default port range %d-%d", DefaultPortRangeStart, DefaultPortRangeEnd) | ||
start, end = DefaultPortRangeStart, DefaultPortRangeEnd |
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.
Looks like these consts aren't used outside of the package, so I guess we can keep those
Doing a quick rebase, and I'll add a commit to keep the consts un-exported |
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
Ah, sorry @thaJeztah, didn't had time to rebase it today. Thanks for doing it 🙂 |
No worries! (apologies on our side for this have taken so long!) |
defaultPortRangeEnd = 60999 | ||
defaultPortRangeEnd = 65535 |
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.
Let me comment on this line; this may have been related to #40055 (comment) as well (in case we need to un-revert this change in range)
/cc @neersighted @corhere @evol262
(and myself, for if this causes havoc in our products 🙈)
Failure is unrelated; known flaky test (#38521)
|
- What I did
Since commit 2c4a868, Docker doesn't
use the value of net.ipv4.ip_local_port_range when choosing an ephemeral
port. This change reverts back to the previous behavior.
Fixes #43054.
- How to verify it
make shell
sysctl -w net.ipv4.ip_local_port_range="39000 40000"
docker run --rm -it -p 80 nginx
docker ps
- Description for the changelog
Use the value of net.ipv4.ip_local_port_range when choosing an ephemeral port