Odd behavior installing ubuntu-desktop on Ubuntu 22.04 and LXD 22.04 containers

I encountered some odd behavior with Ubuntu 22.04 and LXD.

Simple use-case:
On 22.04 Host create a 22.04 LXD container
Install any one of the Ubuntu “flavor’s” Desktops into the container

=======================================================

Create an ubuntu 22.04 container

apt update

apt upgrade -y

apt install ubuntu-desktop -y

this will eventually experience a variety of failures ending with no desktop installed in the 22.04 container

=======================================================

Create an Ubuntu 20.04 container

apt update

apt upgrade -y

apt install ubuntu-desktop -y

This will successfully install the desktop into the 20.04 container.

=======================================================

NOTE:

You can repeat the above scenario trying to install any of the
Ubuntu Flavor’s Desktops.

  • ubuntu-desktop
  • ubuntu-mate-desktop
  • lubuntu-desktop
  • kde-standard
  • kubuntu-desktop
  • xubuntu-desktop
  • ubuntu-budgie-desktop
  • cinnamon-desktop-environment

They all end the same:

  • Failure in the 22.04 container.
  • Success in the 20.04 container.

So there is something wrong with either the LXD 22.04 container images
or
with the Packaging of all the 22.04 “desktop” installation packages (seems unlikely)

I also just spun up an Ubuntu 22.04 Server and after reboot

$ sudo apt install ubuntu-desktop -y

and it too successfully installed the desktop !

@tomp
Tom I can file a bug but against what? LXD 22.04 Ubuntu images?

Well the grub issue has nothing to do with LXD, so is there something for grub?

Sorry I’m confused… “grub issue” ??

I was asking about the fact that attempts to install any Ubuntu “flavor” Desktop in a 22.04 Container fails but succeeds in 20.04 containers and succeeds if installing a Desktop on a 22.04 Server.

Oh I confused your threads.

You’ve not supplied any error messages so I don’t know how we can progress the issue without some more detail I’m afraid.

I have some of them captured so I’ll send them when I get back to my PC.

Brian

I can confirm. I performed an

apt install ubuntu-desktop -y

on a LXD container running Ubuntu 22.04.

Yes that’s the same type error I’m seeing

I captured all the various errors yesterday. It took 5+ hrs to run the

# apt install ubuntu-desktop -y

Below are the error messages from:

HOST: Ubuntu 22.04

LXD Container: Ubuntu 22.04

Command executed in Container: # apt install ubuntu-desktop -y

These are just the errors that occurred.

NOTE: same command executed in a 20.04 Container succeeds with NO errors.

First error that occurs is acpi-support (timeout is maybe 19 min)::

image.png

Next error that occurs is with openvpn (timeout takes maybe 8-10 min).

image.png

Next error that occurs is with “woopsie”… but the timeout takes 20+ min?

image.png

Next…(another 5+ min timeout)

image.png

Next… (another 15+ min timeout)

image.png

Next…

image.png

Next…

image.png

Next…

image.png

Next…

image.png

The ubuntu-desktop installation finally FAILS (run time 5hrs) !

image.png

Host machine:

  • Intel i7
  • 32GB RAM
  • 2TB SSD

Do you get these same errors when running with a LXD VM rather than a container?

@sdeziel does that look like the issue where we need a limits bump for some kernel limit?

Perhaps. Also if I create a LXD container with Ubuntu 22.04 and I try to nest Docker inside it, with the Docker install script:

curl -sSL https://get.docker.com | sh

it fails also even with the nesting flag set to true. Nesting Docker inside an Ubuntu 20.04 LXD container works great with the same script.

At this point, the logs are filled with thousands of repeats of systemd[1]: Condition check resulted in ACPI event daemon being skipped. which could explain the slowness and the eventual timeout.

Here’s a workaround that made 22.04 work for me:

apt-get install -y acpid
systemctl disable --now acpid.service acpid.socket acpid.path
apt install ubuntu-desktop -y

With the above, there is no log about Condition check resulted in ACPI event daemon being skipped which I find weird.

Update: the acpid.service has the following condition:

# systemctl cat acpid | grep Condition
ConditionVirtualization=!container
1 Like

It seems to be a bug with acpid:

Until this is fixed in Ubuntu, one can pre-install acpid and systemctl disable --now acpid.path to avoid the endless log loop.

2 Likes

But in my case acpi-support is just the first of many “fails”

If it’s the root cause of all the others that would be good too.

@bmullan, I followed your reproducer and with my workaround, the ubuntu-desktop install goes smoothly. Could you please try it and report back?

Sure I’ll do that today.

Brian

Yes, the work-around steps:

> apt-get install -y acpid
> systemctl disable --now acpid.service acpid.socket acpid.path
> apt install ubuntu-desktop -y

Let the ubuntu-desktop install complete successfully.

Hopefully the root cause can be addressed so the work-around isn’t needed in the future.

@sdeziel

Whatever the “root-cause” of this bug was not fixed/released yet in 22.04.1.

Luckily, your workaround still works :sweat_smile:

brian mullan