Repository navigation
manager: drop invalid cloud-init network key - #105
Merged
Merged
Conversation
The cloud-config user-data in testbed-default/manager.tf set a
top-level `network: config: disabled` key. Cloud-init 24.x on
Ubuntu 24.04 no longer accepts `network` as a valid user-data
module key and rejects the document during schema validation:
schema.py[WARNING]: cloud-config failed schema validation!
This causes `cloud-init status` to report extended_status
"degraded done" and to exit with code 2 instead of 0, which can
break callers that treat a non-zero exit as a hard failure.
The stanza is also redundant: the same user-data block already
writes a dropin via runcmd that disables cloud-init network
configuration permanently:
echo 'network: {config: disabled}' \
> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
The dropin achieves the same effect through a supported
mechanism, so the invalid top-level key can simply be removed.
AI-assisted: Claude Code
Signed-off-by: Roger Luethi <luethi@osism.tech>
Member
|
According to the docs this is still valid: https://docs.cloud-init.io/en/latest/reference/network-config.html#disabling-network-configuration I think it's okay to remove it because of the redundant |
Contributor
Author
|
The docs you linked seem a bit unclear on whether or not user-data can be used to disable network config, but the error thrown with these lines in the config is real and reproducible. |
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.
Summary
network: config: disabledstanza from thecloud-config user-data in
testbed-default/manager.tf.networkas avalid user-data module key and rejects the document during schema
validation (
cloud-config failed schema validation!), causingcloud-init statusto exit with code 2.cloud-init network configuration via a
runcmdthat writes/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg.Test plan
make managerprovisions a manager VM on Ubuntu 24.04 / cloud-init 24.x/var/log/cloud-init.logno longer containsschema.py[WARNING]: cloud-config failed schema validation!cloud-init statusexits 0 (not 2)/etc/cloud/cloud.cfg.d/99-disable-network-config.cfgis stillwritten by
runcmd, so cloud-init network configuration remainsdisabled
🤖 Generated with Claude Code