Schema for "users" key is too strict
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Committed
|
Medium
|
Unassigned |
Bug Description
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-
[ 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/
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 not exist. So perhaps the validation isn't enforced yet?
tags: | added: bitesize |
Yes, the use case makes sense. You are correct in that it is only a warning, but it's a warning we should fix.