-
Notifications
You must be signed in to change notification settings - Fork 112
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 1897918: UPSTREAM: 93861: apiserver: add --permit-address-sharing flag to listen with SO_REUSEADDR #309
Bug 1897918: UPSTREAM: 93861: apiserver: add --permit-address-sharing flag to listen with SO_REUSEADDR #309
Conversation
fa366a9
to
624d596
Compare
624d596
to
d8a7b3b
Compare
ebdffa5
to
e9de99b
Compare
/retest |
1 similar comment
/retest |
@sttts: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
/retest |
@sttts: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
@sttts: This pull request references Bugzilla bug 1897918, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
e9de99b
to
d793b14
Compare
@sttts: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
d793b14
to
c961747
Compare
@sttts: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
|
||
func permitAddressReuse(network, addr string, conn syscall.RawConn) error { | ||
return conn.Control(func(fd uintptr) { | ||
syscall.SetsockoptInt(int(fd), syscall.SOL_SOCKET, unix.SO_REUSEADDR, 1) |
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.
we don't want to track potential errors?
https://golang.org/pkg/syscall/#SetsockoptInt
func SetsockoptInt(fd, level, opt int, value int) (err error)
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.
yeah maybe
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.
done
/retest Flake. |
c961747
to
fa8a12c
Compare
@sttts: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
/lgtm |
@@ -203,6 +207,11 @@ func (s *SecureServingOptions) AddFlags(fs *pflag.FlagSet) { | |||
fs.BoolVar(&s.PermitPortSharing, "permit-port-sharing", s.PermitPortSharing, | |||
"If true, SO_REUSEPORT will be used when binding the port, which allows "+ | |||
"more than one instance to bind on the same address and port. [default=false]") | |||
|
|||
fs.BoolVar(&s.PermitAddressSharing, "permit-address-sharing", s.PermitPortSharing, |
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.
/hold
we also need to fix it to PermitAddressSharing
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.
the flag would be properly setting s.PermitAddressSharing
just in the future the default value could be incorrect
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.
Good catch!
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.
fixed
/hold cancel
fa8a12c
to
6dbab6b
Compare
@sttts: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
…en with SO_REUSEADDR
6dbab6b
to
59f8ace
Compare
@sttts: the contents of this pull request could not be automatically validated. The following commits could not be validated and must be approved by a top-level approver:
|
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: p0lyn0mial, sttts The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest Please review the full test history for this PR and help us cut down flakes. |
8 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
@sttts: All pull requests linked via external trackers have merged: Bugzilla bug 1897918 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Compare https://stackoverflow.com/a/14388707. This allows to bind before a closed socket leave TIME_WAIT state.
Note: this does not allow another process to bind to the same addr/port in non TIME_WAIT state.
Credits to @bparees for having the insights into the SO_REUSEADDR semantics.
Upstream: kubernetes#93861