-
Notifications
You must be signed in to change notification settings - Fork 247
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
engine: fix provider config precedence #1032
Conversation
I totally see us regressing this again the next time we touch this logic. Could we quickly throw a unit test on top of it (possibly as a followup PR)? |
also maybe a comment in the code (comments are free 😄) |
Regression from coreos#958. We switched the list of providers from an array to a map. But iteration order through a map is undefined, so we lost the precedence of providers. I think this is the cause behind a lot of the FCOS installer test timeouts, such as: coreos/coreos-assembler#1597 There, we pass the Ignition config for the PXE boot via `ignition.config.url`, but if the metal (no-op) fetcher appears earlier than the `cmdline` fetcher, we get no config. And similarly for the installed system when the no-op fetcher appears before the `system` fetcher (which coreos-installer's `--ignition-file` leverages). The likelihood of this happening increased in the v2.4.0 release due to coreos#1002, which only gave us one try to iterate over the correct provider first (at the `fetch` stage), rather than every stage having a go at it. Closes: coreos/coreos-assembler#1597
Let's run install tests on this repo since Ignition is key to automating them.
I looked at this a bit, but it's tricky. I think we'd need to mock the |
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
Great catch! We have blackbox tests for this already and they've been flaking for a while. That explains that. 🎉 |
🎉 |
Regression from #958. We switched the list of providers from an array to
a map. But iteration order through a map is undefined, so we lost the
precedence of providers.
I think this is the cause behind a lot of the FCOS installer test
timeouts, such as:
coreos/coreos-assembler#1597
There, we pass the Ignition config for the PXE boot via
ignition.config.url
, but if the metal (no-op) fetcher appears earlierthan the
cmdline
fetcher, we get no config. And similarly for theinstalled system when the no-op fetcher appears before the
system
fetcher (which coreos-installer's
--ignition-file
leverages).The likelihood of this happening increased in the v2.4.0 release due to
#1002, which only gave us one try
to iterate over the correct provider first (at the
fetch
stage),rather than every stage having a go at it.
Closes: coreos/coreos-assembler#1597