Comment 0 for bug 1999476

Revision history for this message
Robie Basak (racb) wrote :

Against cc_users_groups, I have some configurations that use:

#cloud-config
disable_root: false
users: []

This used to work. I think it's a reasonable configuration: "please make root work, and don't create a non-root user". I'm doing this in order to have management of users/groups done later, not by cloud-init, on these instances.

On booting Ubuntu 22.04 (cloud-init 22.3.4-0ubuntu1~22.04.1), I got:

[ 30.621713] cloud-init[505]: 2022-12-13 03:35:09,073 - schema.py[WARNING]: Invalid cloud-config provided: Please run 'sudo cloud-init schema --system' to see the schema errors.

# cloud-init schema --system
Cloud config schema deprecations:
Error:
Cloud config schema errors: users: [] is too short

This seems to be caused by cloudinit/config/schemas/schema-cloud-config-v1.json specifying "minItems": 1 against the "users" key.

Expected behaviour: the above configuration works as before, with root login permitted but no other users created.

Actual behaviour: unexpected schema warning. However I did get root access as desired, and the ubuntu user does exist. So perhaps the validation isn't enforced yet?