can't launch container using profiles anymore

Asked by Andrej Ricnik

Since the upgrade to lxd_3.0.3-0ubuntu1~18.04.1_amd64.deb on 8 Jan 2019 I can't seem to launch containers w/ any parameters anymore. Just before Christmas the following worked:

lxc launch ubuntu:18.04 -p large -p wlg dbx

Today, this happens:
lxc launch ubuntu:18.04 -p large humpty
Creating humpty
Error: Failed container creation: Create LXC container: Initialize LXC: Mount /dev/storage/containers_humpty onto /var/lib/lxd/storage-pools/data/containers/humpty: no such file or directory

How do I get this to work again?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu lxd Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

What if you prefix the command with sudo?

Revision history for this message
Andrej Ricnik (a-ricnik) said :
#2

Same thing:
andrej@lxd2:/var/lib/lxd$ sudo lxc launch ubuntu:18.04 -p large humpty
[sudo] password for andrej:
Creating humpty
Error: Failed container creation: Create LXC container: Initialize LXC: Mount /dev/storage/containers_humpty onto /var/lib/lxd/storage-pools/data/containers/humpty: no such file or directory

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

What if you make the folder that is missing, does it help?

Revision history for this message
Andrej Ricnik (a-ricnik) said :
#4

I shouldn't need to - that also wasn't necessary for containers created before Xmas
But can try tomorrow - now it's time to go home - long day at work

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

True but if it works then you have identified a bug as well as the work around until it is made to work as expected

Revision history for this message
Andrej Ricnik (a-ricnik) said :
#6

As root:
mkdir /var/lib/lxd/storage-pools/data/containers/humpty

As myself:
lxc launch ubuntu:18.04 -p large humpty
Creating humpty
Error: Failed container creation: Create LXC container: Initialize LXC: Mount /dev/storage/containers_humpty onto /var/lib/lxd/storage-pools/data/containers/humpty: no such file or directory

Again as root:
ls -l /var/lib/lxd/storage-pools/data/containers/humpty
ls: cannot access '/var/lib/lxd/storage-pools/data/containers/humpty': No such file or directory

Revision history for this message
Vladimir Mencl (vladimir-mencl) said :
#7

Hi,

I'm a colleague of Andrej and we've been looking into this together.

I compared the profiles that were failing with profiles that worked:

WORKS:
config: {}
description: 500GB NVMe hard disk space
devices:
  disk:
    path: /
    pool: NVMe
    size: 500GB
    type: disk
name: NVMe500gb
used_by: []

BREAKS:
config: {}
description: 100GB hard disk space
devices:
  disk:
    limits.read: 32768MB
    limits.write: 16384MB
    path: /
    pool: data
    size: 100GB
    type: disk
name: disk100gb
used_by: []

... and could see the difference was in the disk limits.read and limits.write

And dropping the limits with "lxc profile device unset" helped - we've now solved the problem for us by dropping the limits.

But that still leaves open the question whether this is a bug on the lxd side.

The profiles worked for us with 3.0.2 (without knowing whether the limits were enforced), but stopped working with 3.0.3

I can see the following entries in the 3.0.3 changelog:

    - devices: Fix bad disk limits
    - Fix root disk limits on container startup

which sounds like related - but can't tell if this is a regression.

Can someone qualified please reply?

Thanks a lot in advance!

Cheers,
Vlad

Revision history for this message
Launchpad Janitor (janitor) said :
#8

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Vladimir Mencl (vladimir-mencl) said :
#9

And I have just found this is a known issue with LXD 3.0.3 - fixed in upstream code, but yet to be released for Ubuntu: https://github.com/lxc/lxd/issues/5429