[Bug 2047796] Re: autoinstall: user-data validation fails for users or packages if they contain list of object

Yao Wei 2047796 at bugs.launchpad.net
Tue Jan 2 06:54:20 UTC 2024


In the 1st case, the following error message is in the debug log:

Traceback (most recent call last):
  File "/snap/ubuntu-desktop-installer/1276/bin/subiquity/subiquity/server/server.py", line 686, in start
    self.load_autoinstall_config(only_early=False)
  File "/snap/ubuntu-desktop-installer/1276/bin/subiquity/subiquity/server/server.py", line 488, in load_autoinstall_config
    controller.setup_autoinstall()
  File "/snap/ubuntu-desktop-installer/1276/bin/subiquity/subiquity/server/controller.py", line 76, in setup_autoinstall
    self.load_autoinstall_data(ai_data)
  File "/snap/ubuntu-desktop-installer/1276/bin/subiquity/subiquity/server/controllers/userdata.py", line 34, in load_autoinstall_data
    self.app.base_model.validate_cloudconfig_schema(
  File "/snap/ubuntu-desktop-installer/1276/bin/subiquity/subiquity/models/subiquity.py", line 349, in validate_cloudconfig_schema
    raise SchemaValidationError(schema_errors=errors)
cloudinit.config.schema.SchemaValidationError: Cloud config schema errors: autoinstall.user-data.users.0: {'gecos': 'Ubuntu all-oem-init', 'groups': ['adm', 'cdrom', 'dip', 'lxd', 'sudo'], 'home': '/home/ubuntu', 'lock_passwd': False, 'name': 'ubuntu', 'plain_text_passwd': 'ubuntu', 'shell': '/bin/bash'} is not of type 'string', autoinstall.user-data.users.0: {'gecos': 'Ubuntu all-oem-init', 'groups': ['adm', 'cdrom', 'dip', 'lxd', 'sudo'], 'home': '/home/ubuntu', 'lock_passwd': False, 'name': 'ubuntu', 'plain_text_passwd': 'ubuntu', 'shell': '/bin/bash'} is not valid under any of the given schemas

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/2047796

Title:
  autoinstall: user-data validation fails for users or packages if they
  contain list of object

Status in subiquity package in Ubuntu:
  New

Bug description:
  autoinstall.user-data schema validation failed in the following cases:

  * cannot define a user in user-config:

  autoinstall:
    user-data:
      users:
      - name: ubuntu
        plain_text_passwd: 'ubuntu'
        home: /home/ubuntu
        shell: /bin/bash
        lock_passwd: false
        gecos: Ubuntu all-oem-init
        groups: [adm, cdrom, dip, lxd, sudo]

  * cannot use packages[#].apt or packages[#].snap which contains a list
  of packages:

  autoinstall:
    user-data:
      packages:
      - snap:
        - certbot
        - [juju, --edge]
        - [lxd, --channel=5.15/stable]
      - apt:
        - mg

  These schemas documented in cloud-init documentations should be
  usable.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/2047796/+subscriptions




More information about the foundations-bugs mailing list