openshift-metal3 / terraform-provider-ironic

Terraform provider for Ironic
Apache License 2.0
24 stars 25 forks source link

Add user_data_url_headers #46

Closed hardys closed 3 years ago

hardys commented 3 years ago

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 commented 3 years ago

/cc @kirankt @stbenjam

I think we'll need this to make https://github.com/openshift/installer/pull/4359 work (I'm working on an update to that which I'll push when working e2e)