← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1999476] [NEW] Schema for "users" key is too strict

 

Public bug reported:

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?

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1999476

Title:
  Schema for "users" key is too strict

Status in cloud-init:
  New

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-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?

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1999476/+subscriptions