snapd.seeded.service hangs lxd container boots for five minutes

Bug #1891526 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

On a Groovy host, I'm starting a lxd container with:

lxc launch ubuntu-daily:groovy foo

The container starts, but boot doesn't finish for five minutes. The "runlevel" command (as used by autopkgtest-virt-lxd) prints "unknown" and returns a non-zero exit status for that long, causing an autopkgtest run to time out.

"systemd-analyze blame" shows:

5min 13.096s snapd.seeded.service
      1.727s cloud-init.service
      1.466s systemd-networkd-wait-online.service
      1.289s cloud-init-local.service
      1.096s cloud-config.service
       733ms snap.lxd.activate.service
       732ms snapd.apparmor.service
...

It appears that snapd.seeded.service hangs until something times out.

On the host:

$ snap info lxd
...
installed: 4.4 (16723) 74MB -

In the container:

# cat /etc/cloud/build.info
build_name: server
serial: 20200812
# dpkg-query -W snapd
snapd 2.46~pre1.gitaf15176

A colleague has also reproduced this on a Bionic host. I believe reproduction should be straightforward; I can provide more details if is not.

Revision history for this message
Maciej Borzecki (maciek-borzecki) wrote :

Does the problem persist? With the recent images, the seeding completes in < 2s on my system. If you still see the issue, can you attach the output of `snap debug seeding` command?

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

Yes - it's still happening.

# snap debug seeding
seeded: false
seed-error: |
  cannot perform the following tasks:
  - Start snap "lxd" (16889) services ([start snap.lxd.activate.service] failed with exit status 1:
  Job for snap.lxd.activate.service failed because the control process exited with error code.
  See "systemctl status snap.lxd.activate.service" and "journalctl -xe" for details.
  )
  - Connect lxd:lxd-support to snapd:lxd-support (snap "snapd" has no slot named "lxd-support")
  - Connect lxd:network to snapd:network (snap "snapd" has no slot named "network")
  - Connect lxd:network-bind to snapd:network-bind (snap "snapd" has no slot named "network-bind")
  - Connect lxd:system-observe to snapd:system-observe (snap "snapd" has no slot named
  "system-observe")
preseeded: true
image-preseeding: 9.796s
seed-completion: –

# cat /etc/cloud/build.info
build_name: server
serial: 20200819.1

Changed in snapd (Ubuntu):
status: Incomplete → New
Revision history for this message
Robie Basak (racb) wrote :

I can't reproduce this any more. It isn't obvious to me what changed. I wonder if it's a race?

# cat /etc/cloud/build.info
build_name: server
serial: 20200819.1

The host lxd:

installed: 4.4 (16926) 74MB -

The host is running Groovy and has also been generally updated.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

That last error about missing slots looks like another error. It may be a race indeed. How can I reproduce it?

Revision history for this message
Robie Basak (racb) wrote :

> How can I reproduce it?

On the host:

lxc launch ubuntu-daily:groovy foo

Then if "lxc exec foo runlevel" says "unknown" after 10 seconds, the problem is reproduced. When it does so the command has an exit status of 1. If it says "N 5", then the problem didn't occur, and the command has an exit status of 0 in this case.

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.