Jammy: ds-identify: cloud-init disabled by generator due to inability to detect LXD datasource when launched from Jammy host system

Bug #1968085 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init (Ubuntu)
Fix Released
High
Chad Smith

Bug Description

Launching Jammy KVM instances from a Jammy host where kernel is > 5.10 results in ds-identify disabling cloud-init from systemd boot targets due to systemd-detect-virt returning "qemu" instead of "kvm".

Steps to reproduce from Jammy host
$ lxc profile show jammy-vm
config: {}
description: Default LXD profile for jammy VMs
devices:
  eth0:
    name: eth0
    network: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: jammy-vm

$ lxc launch ubuntu-daily:jammy --vm --profile jammy-vm test-jammy
$ lxc exec test-jammy -- systemd-detect-virt
qemu
$ lxc stop test-jammy
$ lxc config set test-jammy security.devlxd=false
$ lxc start test-jammy
$ lxc exec test-jammy -- DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force
# Ensure "no datasource detected"
$ lxc exec test-jammy -- add-apt-repository ppa:cloud-init-dev/daily
$ lxc exec test-jammy -- apt install cloud-init
$ lxc exec test-jammy -- DEBUG_LEVEL=2 DI_LOG=stderr /usr/lib/cloud-init/ds-identify --force
"Found single datasource: LXD"

Chad Smith (chad.smith)
Changed in cloud-init (Ubuntu):
status: New → In Progress
assignee: nobody → Chad Smith (chad.smith)
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 22.1-14-g2e17a0d6-0ubuntu1~22.04.5

---------------
cloud-init (22.1-14-g2e17a0d6-0ubuntu1~22.04.5) jammy; urgency=medium

  * d/p/cpick-be9389c6-Work-around-bug-in-LXD-VM-detection-1325:
    cherry-pick be9389c6: Work around bug in LXD VM detection (#1325)
  * d/p/cpick-30ccd51a-ds-identify-also-discover-LXD-by-presence-from-DMI:
    cherry-pick 30ccd51a: ds-identify: also discover LXD by presence
    from DMI
  * d/p/pick-e3307e4d-ds-identify-detect-LXD-for-VMs-launched-from-host-with:
    cherry-pick e3307e4d: ds-identify: detect LXD for VMs launched from
    host with > 5.10 kernel (LP: #1968085)

 -- James Falcon <email address hidden> Wed, 06 Apr 2022 16:48:16 -0500

Changed in cloud-init (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.