Skip to content
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

Fix cidata user-data ca_certs yaml content #2266

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

afbjorklund
Copy link
Member

@afbjorklund afbjorklund commented Apr 4, 2024

This is failing the cloud-config jsonschema validation, later.

  Error: Cloud config schema errors:
    ca_certs.trusted: None is not of type 'array'

There are some additional fixes, to be followed up in another PR:

  • Cloud config schema deprecations: users.0.uid: Changed in version 22.3. The use of string type is deprecated. Use an integer instead.
-    uid: '1000'
+    uid: 1000
  • Error: Cloud config schema errors: users.0: Additional properties are not allowed ('ssh-authorized-keys' was unexpected
-    ssh-authorized-keys:
+    ssh_authorized_keys:

These are either version-dependent (on the runtime cloud-init version, which we don't know just yet)

Or depends on the implementation, where the canonical python implementation does a magic replace.

@afbjorklund
Copy link
Member Author

The initial attempt got a bit confusing, since it was trying to validate the config from the test cases...

The actual user-data in the default template looked like:

ca_certs:
    remove_defaults: false
    trusted: null

Better to fail validation, if the boolean pointer is still nil

@afbjorklund afbjorklund marked this pull request as draft April 5, 2024 07:42
@afbjorklund afbjorklund self-assigned this Apr 5, 2024
This is failing the cloud-config jsonschema validation, later.
  $ sudo cloud-init schema --system
  Error: Cloud config schema errors:
    ca_certs.trusted: None is not of type 'array'

Signed-off-by: Anders F Björklund <[email protected]>
@afbjorklund afbjorklund removed their assignment Apr 5, 2024
@afbjorklund afbjorklund marked this pull request as ready for review April 5, 2024 10:13
@afbjorklund afbjorklund requested a review from jandubois April 5, 2024 10:13
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@jandubois jandubois merged commit f1096ae into lima-vm:master Apr 5, 2024
25 checks passed
@AkihiroSuda AkihiroSuda added this to the v0.21.1 milestone Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants