Patch feature flags directly into cloud-init code since newer versions do not load feature_overrides.py
anymore
#1546
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.
Change description
This ports the workaround #406 to newer versions of cloud-init which removed the feature flag support and instead prefer monkeypatching.
Without this change, the
ERROR_ON_USER_DATA_FAILURE = False
flag doesn't get used by cloud-init, resulting in errors loading the user data:Such errors mean that a Kubernetes node running this image wouldn't join the cluster (or a cluster cannot even be created if it's the first control plane node). I was able to create a working Ubuntu 24.04 + Kubernetes 1.25.16 cluster again after this fix. I copied the block for RHEL 9 as well, but didn't test it myself. RHEL 8, which is EOL, was left out.
Related issues