lueschem / edi

Embedded development infrastructure.
https://www.get-edi.io
GNU Lesser General Public License v3.0
39 stars 12 forks source link

edi fails with upstream lxd (2.14): No root device could be found. #14

Closed lueschem closed 7 years ago

lueschem commented 7 years ago

Issue Type

Environment detail

NAME="Ubuntu"
VERSION="16.04.2 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.2 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial
+ python3 --version
Python 3.5.2
+ ansible-playbook --version
ansible-playbook 2.1.1.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = Default w/o overrides
+ lxc --version
2.14
+ grep \(lxd\|ansible\)
+ dpkg -l
ii  ansible                                    2.1.1.0-1~ubuntu16.04.1                       all          Configuration management, deployment, and task execution system
ii  lxd                                        2.14-0ubuntu3~16.04.1                         amd64        Container hypervisor based on LXC - daemon
ii  lxd-client                                 2.14-0ubuntu3~16.04.1                         amd64        Container hypervisor based on LXC - client

Desired Behaviour

edi should work with upstream lxd releases.

Actual Behaviour

edi fails with lxd 2.14:

$ sudo edi -v lxc configure my-project-01 my-project-test.yml
...
edi_host_socks_proxy: ''
edi_lxc_network_interface_name: lxcif0
edi_project_plugin_directory: /home/lueschm1/workspace/my-project/plugins
edi_work_directory: /home/lueschm1/workspace/my-project

INFO:root:Running command: ['sudo', '-u', 'lueschm1', 'lxc', 'profile', 'show', 'lxcif0_0c4a88500d0670949c8f']
INFO:root:Running command: ['sudo', '-u', 'lueschm1', 'lxc', 'profile', 'create', 'lxcif0_0c4a88500d0670949c8f']
Profile lxcif0_0c4a88500d0670949c8f created
Success: Created lxc profile lxcif0_0c4a88500d0670949c8f.
INFO:root:Running command: ['sudo', '-u', 'lueschm1', 'lxc', 'profile', 'edit', 'lxcif0_0c4a88500d0670949c8f']
Success: The following profiles are now available: lxcif0_0c4a88500d0670949c8f
Going to launch container.
INFO:root:Running command: ['sudo', '-u', 'lueschm1', 'lxc', 'launch', 'local:my-project-test_edicommand_lxc_import', 'my-project-01', '-p', 'lxcif0_0c4a88500d0670949c8f']
Creating my-project-01
Error: Launching image 'my-project-test_edicommand_lxc_import' failed with the following message:
error: No root device could be found.
lueschem commented 7 years ago

Failure reason:

edi containers do not use the "default" lxd profile. The lxd default profile of newer lxd versions (>=2.9) specifies the storage pool:

$ lxc profile show default
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: default
used_by: []