-
Notifications
You must be signed in to change notification settings - Fork 42
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
Adding node ip hint for all who want to use it #185
Adding node ip hint for all who want to use it #185
Conversation
Skipping CI for Draft Pull Request. |
@cybertron this is what you meant in openshift/machine-config-operator#3222 ? |
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.
it seems a good patch but it's in Draft mode. Are you planing to update it?
bb4381c
to
d330904
Compare
@dougsland waited for enhancement to be pushed |
15e5ebd
to
21853a3
Compare
21853a3
to
311abcd
Compare
311abcd
to
7cee609
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.
Just a couple of things from my test in a dual stack env. Otherwise lgtm.
cc9b257
to
05314b5
Compare
05314b5
to
0facda2
Compare
cmd/runtimecfg/node-ip.go
Outdated
return err | ||
} | ||
ipv6Created = true | ||
} else if !ipv4Created { |
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 makes me a little nervous. If we ever got two ipv6 chosenAddresses, it could potentially result in us writing an ipv6 address to the ipv4 file. To avoid checking IsIPv6 twice (which, honestly, I think is premature optimization. This is a service that runs once per boot and is not performance critical code), I think we need that to be an outer check and then within the cases for it we do the ipv*Created checks. Something like:
if isipv6 {
if !ipv6Created {
create file
}
} else {
if !ipv4Created {
create file
}
}
Note that I don't think it's currently possible to get two ipv6 addresses in chosenAddresses, but if I'm wrong or that changes in the future I'd prefer to have this code handle it correctly.
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 is actually a bug from my side . We should check if not ipv6 , this is why it was there from the start. Sorry
0facda2
to
202759f
Compare
/retest |
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.
One question inline, but the logic looks good to me and this version worked correctly in my local dual stack deployment.
cmd/runtimecfg/node-ip.go
Outdated
@@ -142,7 +166,7 @@ func checkAddressUsable(chosen []net.IP) (err error) { | |||
// If using IPv6, verify that the choosen address isn't tentative | |||
// i.e. we can actually bind to it | |||
if len(chosen) > 0 && net.IPv6len == len(chosen[0]) { | |||
_, err = net.Listen("tcp", "["+chosen[0].String()+"]:") | |||
_, err = net.Listen("tcp", "["+chosen[0].String()+"]:10010") |
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.
Did you mean to change this?
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.
Added it as test and forgot to remove
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.
Okay, I think we should remove it so we aren't adding another required port. Since ci has passed on this version, do you want to do that as a followup?
202759f
to
ed5ecb5
Compare
ed5ecb5
to
090fa86
Compare
@tsorya: all tests passed! 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. |
/lgtm Checked locally in a dual stack env and this correctly populated all of the files. We should be good to go here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cybertron, tsorya 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 |
No description provided.