LTS upgrade to v21 breaks in LXD containers in OpenStack (nova-compute-lxd)
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| cloud-init (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Bug Description
Some time ago, cloud-init version 21 was pushed to all LTS releases including 20.04, and 18.04. It will be installed by default and present in all LTS cloud images.
We are running LXD in OpenStack using nova-compute-lxd and unmodified cloud images. Since cloud-init was upgraded in LTS images, cloud-init will only use the new LXD data source, and will no longer contact the EC2-compatible meta-data server from OpenStack. This means that all LXD instances will not receive any meta-data anymore, as it is only available via the meta-data server.
No new LXD instances can be started and configured in OpenStack, not with the current LTS 18.04 nor the LTS 20.04 images. We cannot rebuild instances nor spawn new ones, despite using the LTS releases that formerly worked.
Can the upgrade be rolled backed, or the data source be disabled, to restore the original LTS behavior?
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: cloud-init 21.4-0ubuntu1~
ProcVersionSign
Uname: Linux 4.15.0-166-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
CloudName: OpenStack
Date: Wed Jan 26 15:44:05 2022
Ec2AMI: ami-000002c6
Ec2AMIManifest: FIXME
Ec2Availability
Ec2InstanceType: p2.medium
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitec
ProcEnviron:
SHELL=/bin/bash
LANG=C.UTF-8
TERM=xterm-
XDG_RUNTIME_
PATH=(custom, no user)
SourcePackage: cloud-init
UpgradeStatus: No upgrade log present (probably fresh install)
user_data.txt: Error: path contained symlinks.
- NonfreeKernelModules.txt Edit (1.1 KiB, text/plain; charset="utf-8")
- Dependencies.txt Edit (7.0 KiB, text/plain; charset="utf-8")
- ProcCpuinfoMinimal.txt Edit (1.3 KiB, text/plain; charset="utf-8")
- cloud-init-output.log.txt.txt Edit (4.9 KiB, text/plain; charset="utf-8")
- logs.tgz.gz Edit (83.6 KiB, application/x-gzip)
The intent was not to change LTS behavior, so yes, we will modify the behavior accordingly.
Can you help me understand your use case so we know what needs to change? Previous to this LXD Datasource, we expected LXD containers to be identified to cloud-init using the NoCloud datasource. It sounds like in your case, they're identifying as a different datasource. You mention Openstack but also an EC2-compatible metadata. Do you know which datasource is being identified and how this is being accomplished?
I looked at the attached logs, and I currently only see logs from a machine that identified the LXD datasource. Is there a possibility of obtaining cloud-init logs from a machine that hasn't been upgraded and doesn't identify the LXD datasource? To do so, run "cloud-init collect-logs" and upload the resulting tarball to this bug.
- cloud-init-output.log Edit (37.8 KiB, text/plain)
We use nova-compute-lxd to run OpenStack "VMs" not as libvirt+QEMU virtual machines, but as LXD containers. The nova-compute-lxd connects to the local LXD daemon and creates containers, using a rootfs image from Glance, and attaching it to networks managed by Neutron (VXLANs in our case). As far as I know, LXD basically is used as a dumb "hypervisors".
As images, we use the rootfs images "focal-
Before the upgrade, the LXD container used "DataSourceOpen
> To do so, run "cloud-init collect-logs" and upload the resulting tarball to this bug.
I'll see if I can find a still running container. Most instances were recently recreated, which failed. But I was able to find a cloud-init log from a previous instance, that shows the data source as DataSourceOpenS
upstream commits landed which should resolve this issue on the next published release of cloud-init v. 22.1. Expectation is within the next 3 weeks this fix will be in daily Ubuntu images.
- upstream commit reordering LXD datasource detecting priority to after OpenStack: https:/
- upstream commits to Ubuntu bionic/
- https:/
This bug was fixed in the package cloud-init - 21.4-119-
---------------
cloud-init (21.4-119-
* d/cloud-
* New upstream snapshot.
- tests: lsblk --json output changes mountpoint key to mountpoinst []
(#1261)
- mounts: fix mount opts string for ephemeral disk (#1250)
[Chris Patterson]
- Shell script handlers by freq (#1166) [Chris Lalos]
- minor improvements to documentation (#1259) [Mark Esler]
- cloud-id: publish /run/cloud-
- add "eslerm" as contributor (#1258) [Mark Esler]
- sources/azure: refactor ssh key handling (#1248) [Chris Patterson]
- bump pycloudlib (#1256)
- sources/hetzner: Use EphemeralDHCPv4 instead of static configuration
(#1251) [Markus Schade]
- bump pycloudlib version (#1255) [Brett Holman]
- Fix IPv6 netmask format for sysconfig (#1215) [Harald] (LP: #1959148)
- sources/azure: drop debug print (#1249) [Chris Patterson]
- tests: do not check instance.
- sources/azure: consolidate ephemeral DHCP configuration (#1229)
[Chris Patterson]
- cc_salt_minion freebsd fix for rc.conf (#1236) [Brett Holman]
- sources/azure: fix metadata check in _check_
[Chris Patterson]
- Add _netdev option to mount Azure ephemeral disk (#1213) [Eduardo Otubo]
- testing: stop universally overwriting /etc/cloud/
- Integration test changes (#1240)
- Fix Gentoo Locales (#1205) [Brett Holman]
- Add "slingamn" as contributor (#1235) [Shivaram Lingamneni]
- integration: do not LXD bind mount /etc/cloud/
- Integration testing docs and refactor (#1231)
- vultr: Return metadata immediately when found (#1233) [eb3095]
- spell check docs with spellintian (#1223) [Brett Holman]
- docs: include upstream python version info (#1230)
- Schema a d (#1211)
- Move LXD to end ds-identify DSLIST (#1228) (LP: #1959118)
- fix parallel tox execution (#1214) [Brett Holman]
- sources/azure: refactor _report_
[Chris Patterson]
- Do not support setting up archive.
[Steve Langasek] (LP: #1959343)
- Vultr: Fix lo being used for DHCP, try next on cmd fail (#1208) [eb3095]
- sources/azure: refactor _should_
(#1206) [Chris Patterson]
- update ssh logs to show ssh private key gens pub and simplify code
(#1221) [Steve Weber]
- Remove mitechie from stale PR github action (#1217)
- Include POST format in cc_phone_home docs (#1218) (LP: #1959149)
- Add json parsing of ip addr show (SC-723) (#1210)
- cc_rsyslog: fix typo in docstring (#1207) [Louis Sautier]
- Update .github-cla-signers (#1204) [Chris Lalos]
- sources/azure: drop unused case in _report_failure() (#1200)
[Chris Patterson]
- sources/azure: always initialize _ephemeral_dhcp_ctx on unpickle (#1199)
[Chris Patterson]
- Add support fo...
The fix seems to still not be available in Ubuntu 18.04 and 20.04 as well as their cloud images. The current images still list the LXD data source before the OpenStack data source.
Is there any additional step needed to fix the issue in the LTS releases?
Jan, the fix is available upstream but not yet rolled out to existing Ubuntu series. They're expected to roll out next week assuming no additional issues are found.
The version number is 22.1-14-