Fix VMware guestinfo variable retrieval and add the missing *.config.url variable#11
Merged
pothos merged 1 commit intoflatcar-masterfrom Apr 17, 2020
Merged
Conversation
neilmayhew
reviewed
Apr 8, 2020
neilmayhew
reviewed
Apr 8, 2020
The decision whether to use ignition.config.data or coreos.config.data was based on their presence in ovfenv. If this was missing, coreos.config.data would always be used. Also, if the retrieval of the guestinfo would have an error, the value from ovfenv would not be used even though it was supposed to be a fallback. Thus, refactor the logic to get variables from the ovfenv as fallback while preferring the direct guestinfo variables. With this new function, fix the logic of falling back to coreos.config.data but preferring ignition.config.data. The OVF metadata for CoreOS specified guestinfo.coreos.config.url but that was never used to fetch the Ignition config. Thus, use guestinfo.*.config.url as fallback if no guestinfo.*.config.data variables are set.
d334aab to
380801d
Compare
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2020
There was a logical mistake in Ignition that caused ignition.config.* only to work when it was part of the ovfenv. Thus they were added but the old CoreOS variables marked deprecated and kept. With both as OVF variables each of them worked but directly specifying ignition.config.* as guest variable still didn't because of the logical mistake. Now there is a fix and both work well when specified directly as guest variable (flatcar/ignition#11). Delete the old CoreOS OVF variables because they just clutter the UI and only the Ignition variables should be used in the UI.
This was referenced Apr 17, 2020
dongsupark
approved these changes
Apr 17, 2020
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2020
There was a logical mistake in Ignition that caused ignition.config.* only to work when it was part of the ovfenv. Thus they were added but the old CoreOS variables marked deprecated and kept. With both as OVF variables each of them worked but directly specifying ignition.config.* as guest variable still didn't because of the logical mistake. Now there is a fix and both work well when specified directly as guest variable (flatcar/ignition#11). Delete the old CoreOS OVF variables because they just clutter the UI and only the Ignition variables should be used in the UI.
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2020
There was a logical mistake in Ignition that caused ignition.config.* only to work when it was part of the ovfenv. Thus they were added but the old CoreOS variables marked deprecated and kept. With both as OVF variables each of them worked but directly specifying ignition.config.* as guest variable still didn't because of the logical mistake. Now there is a fix and both work well when specified directly as guest variable (flatcar/ignition#11). Delete the old CoreOS OVF variables because they just clutter the UI and only the Ignition variables should be used in the UI.
pothos
added a commit
to flatcar/scripts
that referenced
this pull request
Apr 17, 2020
There was a logical mistake in Ignition that caused ignition.config.* only to work when it was part of the ovfenv. Thus they were added but the old CoreOS variables marked deprecated and kept. With both as OVF variables each of them worked but directly specifying ignition.config.* as guest variable still didn't because of the logical mistake. Now there is a fix and both work well when specified directly as guest variable (flatcar/ignition#11). Delete the old CoreOS OVF variables because they just clutter the UI and only the Ignition variables should be used in the UI.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 17, 2020
Pulls in flatcar/ignition#11 to fix VMware guestinfo variable retrieval and add the missing *.config.url variable.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 17, 2020
Pulls in flatcar/ignition#11 to fix VMware guestinfo variable retrieval and add the missing *.config.url variable.
|
Thank you! |
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 17, 2020
Pulls in flatcar/ignition#11 to fix VMware guestinfo variable retrieval and add the missing *.config.url variable.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 17, 2020
Pulls in flatcar/ignition#11 to fix VMware guestinfo variable retrieval and add the missing *.config.url variable.
pothos
added a commit
to flatcar-archive/coreos-overlay
that referenced
this pull request
Apr 17, 2020
Pulls in flatcar/ignition#11 to fix VMware guestinfo variable retrieval and add the missing *.config.url variable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
guestinfo.*.config.datavariable retrievalThe decision whether to use
ignition.config.dataorcoreos.config.datawas based on their presence in ovfenv. If this was missing,
coreos.config.datawould always be used. Also, if the retrieval of the guestinfo would have an error,
the value from ovfenv would not be used even though it was supposed to be a fallback.
Refactor the logic to get variables from the ovfenv as fallback while preferring the
direct guestinfo variables. With this new function, fix the logic of falling back to
coreos.config.databut preferringignition.config.data.*.config.urlwhich was missingThe OVF metadata for CoreOS specified
guestinfo.coreos.config.urlbut that wasnever used to fetch the Ignition config.
Use
guestinfo.*.config.urlas fallback if noguestinfo.*.config.datavariables are set.How to use
Enter an SDK and point the Ignition ebuild to this commit.
Then build the image:
Create a VM from the image in, e.g., VMware ESXi via
ovftooland via the web UI. Either specify thecoreos.config.urlorignition.config.urlvariable to point to an Ignition file served via HTTP, or specifycoreos.config.dataandcoreos.config.data.encodingorignition.config.dataandignition.config.data.encoding(a valid encoding is, e.g.,base64with the data being converted viacat ignition.json | base64 --wrap=0).Testing done
Tested locally and on ESXi.
I will also file an upstream PR if possible (but upstream master does not have fallback to
coreos*variables).