-
Notifications
You must be signed in to change notification settings - Fork 30
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
Ignition fails to detect cloud-config when jinja templates are used #953
Comments
Thanks for reporting, that's something we need to fix upstream but could already backport it, maybe to Flatcar Alpha/Beta if not Stable |
I see where you're coming from but there are a couple of issues getting mixed up here:
So this is not something that will work, even if ignition accepts it. |
Ah right, coreos-cloudinit couldn't handle it anyway^^ So unless running the real cloud-init on Flatcar is a thing, we don't need this for Flatcar. (Still it would be nice to fix the detection.) |
Aah, thanks for pointing that out. I will try ignition instead! Fixing the detection might indeed be nice, though if it results in a broken cloud-config it might not be that useful. Maybe throw an error to indicate that jinja is unsupported? |
Description
Ignition's
isCloudConfig
function doesn't properly detect cloud-config when using jinja templates. For example, Kubernetes cluster-api uses jinja templates for cloud-config. The user-data fetched from metadata service looks like this (gzipped):The
isCloudConfig
function only looks for the first line of the config to contain#cloud-config
:But in the case of Jinja templates, the first header is
## template: jinja
. The functionisCloudConfig
will have to be adapted to check in at least the first 2 lines for#cloud-config
.Impact
cloud-config is not detected, resulting in
config.Parse
attempting to handle the user-data as raw json, which it isn't (its gzipped yaml), resulting in a boot failure and emergency modeEnvironment and steps to reproduce
flatcar-stable-3374.2.3 running in Cloudstack (KVM virt)
a. boot an instance with user-data containing a cloud-config using jinja templates
Expected behavior
Proper boot and processing of cloud-config
Additional information
Please add any information here that does not fit the above format.
The text was updated successfully, but these errors were encountered: