unable to provide autoinstall user-data to jammy-server-live-amd64.iso daily images with cloud-init 23.3.1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
subiquity (Ubuntu) |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
During manual SRU verification of cloud-init 23.3.1 from jammy-proposed subiquity is unable to read cloud-init user-data containing autoinstall directives due to a traceback while trying to invoke stages.Init() prior to reading cloud-init combined user-data.
### From /var/log/
2023-10-03 17:00:49,502 INFO subiquity:163 Starting Subiquity server revision 5097 of snap /snap/subiquity
...
2023-10-03 17:00:53,165 WARNING cloudinit.
2023-10-03 17:00:53,166 DEBUG cloudinit.
Traceback (most recent call last):
File "/snap/
return pickle.
AttributeError: Can't get attribute 'Udhcpc' on <module 'cloudinit.
This traceback is due to unpickling errors due to an older version of cloud-init (23.2.2) installed in the snap being unable to unpickle the cached datasource written by the host version of cloud-init (23.3.1) at /var/lib/
Because the subiquity snap updates cloud-init at a different pace than SRU's of cloud-init into jammy-updates, this issue will show up anytime cloud-init SRU's an update to classes or attributes related to the cached datasource object.
To avoid this unpickling incompatibility, subiquity already landed an upstream fix[1] to avoid using stages.Init() in favor of reading cloud-init's processed config artifact at /run/cloud-
This upstream release is not yet in the stable version of the subiquity snap #5097. And a release is expected in a couple of weeks that will contain this fix.
### References:
1: upstream fix to prefer /run/cloud-
https:/
### Reproducer steps:
## to be updated
wget https:/
pull-lp-debs cloud-init jammy-proposed
# inject cloud-init from jammy-proposed
cat > proposed-
- name: setup-rootfs
- name: cp
source: /home/csmith/
dest: rootfs/
- name: shell
EOF
git clone <email address hidden>
sudo PYTHONPATH=
# At the /tmp prompt
chroot rootfs
dpkg -i /cloud-init*deb
exit
exit
mkdir -p ~/cidata
cd ~/cidata
cat > user-data << 'EOF'
#cloud-config
autoinstall:
version: 1
identity:
hostname: ubuntu-server
password: "$6$exDY1mhS4KU
username: ubuntu
EOF
touch meta-data
cloud-localds ~/seed.iso user-data meta-data
truncate -s 10G image.img
$ kvm -name ci-test-
summary: |
- nable to provide autoinstall user-data to jammy-server-live-amd64.iso + unable to provide autoinstall user-data to jammy-server-live-amd64.iso daily images with cloud-init 23.3.1 |
description: | updated |
description: | updated |
description: | updated |
Changed in cloud-init (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
description: | updated |
I can confirm with Chad's steps that Subiquity will fail to see the autoinstall. installer/ subiquity- server- debug.log ll_config only_early True file None` server- debug.log cloud/instance/ obj.pkl`
Some telltale symptoms of this are:
1. the Subiquity TUI is showing the first screen instead of carrying out the autoinstall steps
2. the following log statement in /var/log/
`load_autoinsta
3. the specific error for this issue, also in subiquity-
`Failed loading pickled blob from /var/lib/
To apply the fix, for now please run
sudo snap refresh --beta subiquity
After the refresh is complete, the Subiquity TUI should change to show the progress of the autoinstall. Log statements for that will look like: init/combined- cloud-config. json l_config only_early True file /autoinstall.yaml
```
Loaded cloud config from /run/cloud-
autoinstall found in cloud-config
load_autoinstal
```
I suggest not holding cloud-init SRU, as the fix for this issue will be released on or around October-12th.