Skip to content
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

Add user_data_url_headers #46

Merged
merged 3 commits into from
Dec 1, 2020
Merged

Conversation

hardys
Copy link

@hardys hardys commented Nov 27, 2020

When retrieving user_data_url from some sources it's necessary to include headers to get the desired result, in particular when
reading data from the MCS on OpenShift it's necessary to include

"Accept: application/vnd.coreos.ignition+json; version=3.1.0"

Otherwise the GET returns a 2.2.0 config which isn't compatible with the latest OS images.

https://github.com/openshift/machine-config-operator/blob/master/docs/HACKING.md#accessing-the-machineconfigserver-directly

Also adjusted the error handling so it's clearer if there's a problem retrieving the config as previously this was silently ignored.

@hardys
Copy link
Author

hardys commented Nov 27, 2020

/cc @kirankt @stbenjam

I think we'll need this to make openshift/installer#4359 work (I'm working on an update to that which I'll push when working e2e)

Copy link
Member

@stbenjam stbenjam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small thing but otherwise lgtm

@hardys hardys force-pushed the url_fixes branch 2 times, most recently from 6f866e3 to d47c796 Compare November 30, 2020 10:38
When retrieving user_data_url from some sources it's necessary to
include headers to get the desired result, in particular when
reading data from the MCS on OpenShift it's necessary to include

"Accept: application/vnd.coreos.ignition+json; version=3.1.0"

Otherwise the GET returns a 2.2.0 config which isn't compatible
with the latest OS images.

More info here:
https://github.com/openshift/machine-config-operator/blob/master/docs/HACKING.md#accessing-the-machineconfigserver-directly
@hardys hardys force-pushed the url_fixes branch 6 times, most recently from ffb2309 to 278e157 Compare November 30, 2020 16:20
@hardys hardys force-pushed the url_fixes branch 2 times, most recently from 2bcc6c5 to c243578 Compare December 1, 2020 09:06
@stbenjam stbenjam merged commit 8ba6ddd into openshift-metal3:master Dec 1, 2020
hardys pushed a commit to hardys/installer that referenced this pull request Dec 2, 2020
hardys pushed a commit to hardys/installer that referenced this pull request Dec 2, 2020
This restores the work which was previously done via openshift#3276
but then reverted via openshift#3589 due to breaking users who customized
the pointer ignition config in IPI deployments.

A solution to that has been proposed via openshift#4413 - see openshift/enhancements#540 for more details.

Note that some additional changes beyond the initial implementation
were required due to the MCO now supporting multiple
ignition versions, thus this depends on openshift-metal3/terraform-provider-ironic#46

Co-Authored-By: Steven Hardy <shardy@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants