Cannot start bash session for buildd vm images in LXD vm

Bug #1915571 reported by Cody Shepherd
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
livecd-rootfs (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Unassigned
Bionic
Undecided
Unassigned
Focal
Undecided
Unassigned
Groovy
Undecided
Unassigned

Bug Description

Ubuntu "bootable" buildd vm images, if imported into lxd and booted in a VM container, cannot produce an interactive bash session via, e.g. `lxd exec <name> bash`.

This appears to be a problem of the buildd image lacking grub settings to produce console output on ttyS0. Lack of console output also prevents the required manual install of the lxd agent as detailed in this [1] Discourse post about booting Ubuntu in lxd vms.

[Impact]

 * This negatively impacts the user experience of Ubuntu buildd images in lxd, which is one of the target environments for the buildd images

[Test Case]

 * create a metadata.yaml file for the buildd image (these will soon be downloadable from cloud-images.ubuntu.com/buildd):

{
    "architecture": "x86_64",
    "creation_date": <unix timestamp>,
    "properties": {
        "architecture": "amd64",
        "description": "Ubuntu buildd focal amd64",
        "os": "Ubuntu",
        "series": "focal"
    }
}

 * tar the metadata.yaml file into <name>.tar.xz
 * obtain the focal buildd image of your choice, e.g. from [2]
 * import the image into lxd: `lxd image import <name>.tar.xz <buildd-image>.img`
 * follow the "extra steps for official Ubuntu images" in [1] to init, configure, and start a lxd vm using the image by its fingerprint
 * Attempt console log in via `lxc console <vm name>` or a bash session via `lxc exec <vm name> bash`
 * Note that without console output it is not possible to log in via the lxc console to install the lxd agent, and therefore not possible to obtain a bash session via lxc exec

[Where problems could occur]

 * Turning on console output requires changing grub configs; certain values of these configs could break current expectations about buildd image behavior

[Other Info]

 * This issue affects buildd images from all suites, but the lxd-agent-loader package is only available for focal+

[1] https://discuss.linuxcontainers.org/t/running-virtual-machines-with-lxd-4-0/7519
[2] http://cloud-images.ubuntu.com/buildd/releases/focal/release/focal-server-cloudimg-amd64-disk.img

Related branches

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.713

---------------
livecd-rootfs (2.713) hirsute; urgency=medium

  * Use the full name of the 'boot' flag in parted calls as it's not good
    practice to rely on the shortened, ambiguous version.

 -- Łukasz 'sil2100' Zemczak <email address hidden> Wed, 24 Feb 2021 12:55:37 +0100

Changed in livecd-rootfs (Ubuntu):
status: New → Fix Released
Steve Langasek (vorlon)
Changed in livecd-rootfs (Ubuntu Groovy):
status: New → In Progress
Steve Langasek (vorlon)
Changed in livecd-rootfs (Ubuntu Focal):
status: New → In Progress
Revision history for this message
Steve Langasek (vorlon) wrote :

Is the patch for xenial still relevant? xenial has reached end of standard support and final images are being rolled. Do we need another buildd vm image for 16.04?

Changed in livecd-rootfs (Ubuntu Bionic):
status: New → In Progress
Changed in livecd-rootfs (Ubuntu Xenial):
status: New → Incomplete
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Cody, or anyone else affected,

Accepted livecd-rootfs into groovy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.694.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-groovy to verification-done-groovy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-groovy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Groovy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-groovy
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Cody, or anyone else affected,

Accepted livecd-rootfs into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.664.23 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Cody, or anyone else affected,

Accepted livecd-rootfs into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/livecd-rootfs/2.525.54 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in livecd-rootfs (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (livecd-rootfs/2.525.54)

All autopkgtests for the newly accepted livecd-rootfs (2.525.54) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

livecd-rootfs/unknown (arm64)
ubuntu-image/unknown (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#livecd-rootfs

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Gauthier Jolly (gjolly) wrote :

I built the following images using the version in -proposed and it worked as expected.

Concerning the autopkgtest regression, I think it is unrelated with this change. It seems to be related to openstack and nova setup.

Groovy
======

ubuntu@ubuntu:~$ lsb_release -c -r
Release: 20.10
Codename: groovy
ubuntu@ubuntu:~$ cat /etc/default/grub.d/50-builddimg-settings.cfg
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0.1
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0.1
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
GRUB_RECORDFAIL_TIMEOUT=0
GRUB_TERMINAL=console
ubuntu@ubuntu:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.8.0-54-generic root=PARTUUID=797f2571-c983-48c6-9f6f-7b36391dddd3 ro console=ttyS0

Focal
=====

ubuntu@ubuntu:~$ lsb_release -r -c
Release: 20.04
Codename: focal
ubuntu@ubuntu:~$ cat /etc/default/grub.d/50-builddimg-settings.cfg
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0.1
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0.1
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
GRUB_RECORDFAIL_TIMEOUT=0
GRUB_TERMINAL=console
ubuntu@ubuntu:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-5.4.0-74-generic root=PARTUUID=182116e9-0eda-43a0-beff-1e5acca75889 ro console=ttyS0

Bionic
======

ubuntu@ubuntu:~$ lsb_release -c -r
Release: 18.04
Codename: bionic
ubuntu@ubuntu:~$ cat /etc/default/grub.d/50-builddimg-settings.cfg
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0.1
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=0.1
GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"
GRUB_RECORDFAIL_TIMEOUT=0
GRUB_TERMINAL=console
ubuntu@ubuntu:~$ cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-4.15.0-20-generic root=PARTUUID=8fbea74d-4805-4438-9bd6-f7725963faa2 ro console=ttyS0

tags: added: verification-done verification-done-bionic verification-done-focal verification-done-groovy
removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-groovy
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for livecd-rootfs has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.664.23

---------------
livecd-rootfs (2.664.23) focal; urgency=medium

  * Adding dependencies for Active Directory support (LP: #1921374)

livecd-rootfs (2.664.22) focal; urgency=medium

  * Add grub config to produce console output and install lxd-agent loader
    to allow buildd vm images to work in lxd without requirement for manual
    installation (LP: #1915571)

 -- Jean-Baptiste Lallement <email address hidden> Thu, 20 May 2021 17:52:20 +0200

Changed in livecd-rootfs (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.694.6

---------------
livecd-rootfs (2.694.6) groovy; urgency=medium

  * Add grub config to produce console output and install lxd-agent loader
    to allow buildd vm images to work in lxd without requirement for manual
    installation (LP: #1915571)

 -- Cody Shepherd <email address hidden> Thu, 20 May 2021 16:55:41 -0800

Changed in livecd-rootfs (Ubuntu Groovy):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

I've submitted a request to retry the failing autopkgtests for Bionic.

livecd-rootfs/unknown (arm64)
ubuntu-image/unknown (arm64)

Revision history for this message
Thomas Bechtold (toabctl) wrote :

@Brian, thanks! Both tests pass now. Can you move livecd-rootfs for bionic from proposed to updates please?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package livecd-rootfs - 2.525.54

---------------
livecd-rootfs (2.525.54) bionic; urgency=medium

  * Add grub config to produce console output to allow buildd vm images to
    produce console output in lxd vms (LP: #1915571)

 -- Cody Shepherd <email address hidden> Fri, 21 May 2021 17:30:56 -0700

Changed in livecd-rootfs (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers