autoinstall: user-data validation fails for users or packages if they contain list of object
Bug #2047796 reported by
Yao Wei
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
New
|
Undecided
|
Unassigned | ||
subiquity |
Invalid
|
Undecided
|
Unassigned | ||
subiquity (Ubuntu) |
Invalid
|
Undecided
|
Olivier Gayot |
Bug Description
autoinstall.
* cannot define a user in user-config:
autoinstall:
user-data:
users:
- name: ubuntu
plain_
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=
- apt:
- mg
These schemas documented in cloud-init documentations should be usable.
description: | updated |
Changed in subiquity (Ubuntu): | |
assignee: | nobody → Olivier Gayot (ogayot) |
tags: | added: foundations-todo |
tags: | removed: foundations-todo |
To post a comment you must log in.
In the 1st case, the following error message is in the debug log:
Traceback (most recent call last): ubuntu- desktop- installer/ 1276/bin/ subiquity/ subiquity/ server/ server. py", line 686, in start load_autoinstal l_config( only_early= False) ubuntu- desktop- installer/ 1276/bin/ subiquity/ subiquity/ server/ server. py", line 488, in load_autoinstal l_config setup_autoinsta ll() ubuntu- desktop- installer/ 1276/bin/ subiquity/ subiquity/ server/ controller. py", line 76, in setup_autoinstall load_autoinstal l_data( ai_data) ubuntu- desktop- installer/ 1276/bin/ subiquity/ subiquity/ server/ controllers/ userdata. py", line 34, in load_autoinstal l_data app.base_ model.validate_ cloudconfig_ schema( ubuntu- desktop- installer/ 1276/bin/ subiquity/ subiquity/ models/ subiquity. py", line 349, in validate_ cloudconfig_ schema nError( schema_ errors= errors) config. schema. SchemaValidatio nError: 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
File "/snap/
self.
File "/snap/
controller.
File "/snap/
self.
File "/snap/
self.
File "/snap/
raise SchemaValidatio
cloudinit.