-
Notifications
You must be signed in to change notification settings - Fork 615
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
Generated user-data
is failing cloud-config schema validation
#2265
Comments
Note that changing to "ssh_authorized_keys" will actually fail some alternative cloud-init implementations... Such as lima-init, or tinycloudinit. They have "ssh-authorized-keys" hardcoded, in their alternate parsers (awk) Seems to be a (python) bug in the cloud-init documentation: |
We can easily fix
|
The tinycloudinit was just a hack that I used when playing with tinycorelinux, it is a similar awk script (with similar fix) https://github.com/spinto/tinycloudinit EDIT: fixed on master now (by checking for both dashes and underscores...), along with some other bugs and features |
This comment was marked as outdated.
This comment was marked as outdated.
Checking for deprecated and changed fields actually requires both enabling "annotations" and patching jsonschema... "uid": {
"description": "The user's ID. Default value [system default]",
"oneOf": [
{
"type": "integer"
},
{
"type": "string",
"changed": true,
"changed_description": "The use of ``string`` type is deprecated. Use an ``integer`` instead.",
"changed_version": "22.3"
}
]
} The "changed" feature seems to have been invented by cloud-init, since I can't find it on https://json-schema.org/ There is a very similar "deprecated" feature that handles removal, but doesn't cover haphazard renaming of fields. |
As mentioned in the PRs, the revision v1 (or And there are even more variants of cloud-config, if you count the years before the jsonschema existed... So we should not change the type of these, just because they are deprecated (or outright missing):
|
Related issue: |
The lima generated cloud-config.yaml now passes validation with
|
Description
There are some reports in the log, about the user-data failing validation.
[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.
We should probably run yaml and jsonschema validation, on the
user-data
?But at least fix the syntax errors, and try to conform to the cloud-init schema...
The text was updated successfully, but these errors were encountered: