-
Notifications
You must be signed in to change notification settings - Fork 253
url: support IPv4 and IPv6 for IMDS #2052
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Mathieu Tortuyaux <[email protected]>
internal/resource/url.go
Outdated
} | ||
|
||
// Wait for one success. (i.e wait for the first configuration to be available) | ||
ip := <-success |
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.
Sorry if this is a dumb question, If neither succeed what happens? is there a default timeout?
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.
Not yet, the PR is still in "draft" as I wanted first to have users feedback before on the overall logic. I still need to polish the error handling and the case you mentioned. I'm thinking of having something similar to the OpenStack dispatch implementation here:
if dispatchCount == 0 { |
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.
No worries :) I was just making sure I was not missing it. Yeah I think that would work well here.
@tormath1 this looks really good; thank you for working on this. These changes make a lot of sense. |
Your call on this, that would be good indeed to see how it fits on OpenStack - maybe you can create separate branch to keep your initial proposal around? |
This defines a wrapper that will try in paralell both IPv4 and IPv6 when the provider declares those two IPs. Signed-off-by: Mathieu Tortuyaux <[email protected]>
Signed-off-by: Mathieu Tortuyaux <[email protected]>
Signed-off-by: Mathieu Tortuyaux <[email protected]>
Hey! I have a local backup with the initial proposal, but I think yours might be a better fit for what we need. I went ahead and updated my PR to use the helper Still working on it, but feel free to take a look :) |
Hi,
This PR is another approach to try solving the IPv4 / IPv6 question on Ignition for Scaleway and OpenStack providers. The idea is to implement a helper:
resource.FetchConfigDualStack
that will try to fetch Ignition configuration from multiple endpoints (IPv4 and IPv6). The first one to return a configuration will win the race.This allows to have a common implementation as each provider can decide if it wants to use or not IPv4, IPv6 or both and by still implementing its own fetching logic.
Related to: #1897, flatcar/Flatcar#1696 and #1909
Locally tested on Scaleway and currently tested on Flatcar CI (flatcar/scripts#2824) but it's pointless as we don't have yet tests for IPv6 on Scaleway or OpenStack: