Conversation
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.
Sorry if this is a dumb question, If neither succeed what happens? is there a default timeout?
There was a problem hiding this comment.
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:
There was a problem hiding this comment.
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? |
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 :) |
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 <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
|
Going to close this as it was included in #1909 |
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.FetchConfigDualStackthat 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.
Test result: https://gist.github.com/tormath1/0daa42261ee93cb4f3e7a2230797200d