lxc

Regression: "lxc-create -B best" stopped working

Bug #1574969 reported by Martin Pitt
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Auto Upgrade Testing
Triaged
Medium
Max Brustkern
lxc
New
Undecided
Unassigned
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I want to use btrfs storage if available, otherwise the plain old directory/copies. Until not too long ago, this worked:

  $ sudo lxc-create -B best --name=adt-xenial -t ubuntu -- -r xenial

But now in final xenial it fails with "best is not a valid backing storage type.".

But the manpage still documents it:

              If backingstore is 'best', then lxc will try, in order, btrfs, zfs, lvm, and finally a di‐
              rectory backing store.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lxc 2.0.0-0ubuntu2
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CurrentDesktop: i3
Date: Tue Apr 26 08:33:14 2016
EcryptfsInUse: Yes
PackageArchitecture: all
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
 lxc.network.hwaddr = 00:16:3e:xx:xx:xx
dnsmasq.conf:
 enable-tftp
 tftp-root=/tmp/tftp
 dhcp-boot=pxelinux.0
lxc.conf: lxc.lxcpath = /srv/lxc

Revision history for this message
Martin Pitt (pitti) wrote :
tags: added: regression-release
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in lxc (Ubuntu):
status: New → Confirmed
Changed in auto-upgrade-testing:
assignee: nobody → Max Brustkern (nuclearbob)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks - this is fixed upstream, probably by

commit fb5ab35bfae46f75e988df28da1edce8cbb5f27c
Author: Christian Brauner <email address hidden>
Date: Mon Apr 11 17:13:16 2016 +0200

    lxc-create: fix -B best option

Until that is merged and SRUd, you can get the fix from ppa:ubuntu-lxc/daily.

Changed in lxc (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Quanah (quanah-zimbra) wrote :

This is breaking the ability to use vagrant with LXC boxes.

/opt/vagrant/embedded/gems/gems/vagrant-1.8.1/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'
 INFO interface: error: There was an error executing ["sudo", "/usr/bin/env", "lxc-create", "-B", "best", "--template", "/home/quanah/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template", "--name", "u1690_default_1462660055308_76102", "--", "--tarball", "/home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/rootfs.tar.gz", "--config", "/home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/lxc-config"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
There was an error executing ["sudo", "/usr/bin/env", "lxc-create", "-B", "best", "--template", "/home/quanah/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template", "--name", "u1690_default_1462660055308_76102", "--", "--tarball", "/home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/rootfs.tar.gz", "--config", "/home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/lxc-config"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
 INFO interface: Machine: error-exit ["Vagrant::LXC::Errors::ExecuteError", "There was an error executing [\"sudo\", \"/usr/bin/env\", \"lxc-create\", \"-B\", \"best\", \"--template\", \"/home/quanah/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template\", \"--name\", \"u1690_default_1462660055308_76102\", \"--\", \"--tarball\", \"/home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/rootfs.tar.gz\", \"--config\", \"/home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/lxc-config\"]\n\nFor more information on the failure, enable detailed logging by setting\nthe environment variable VAGRANT_LOG to DEBUG."]
quanah@ub16:~/vagrant/u1690$ sudo su -
root@ub16:~# lxc-create -B best --template /home/quanah/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template --name u1690_default_1462660055308_76102 -- --tarball /home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/rootfs.tar.gz --config /home/quanah/.vagrant.d/boxes/developerinlondon-VAGRANTSLASH-lxc-xenial/0.1/lxc/lxc-config
best is not a valid backing storage type.

Revision history for this message
Gennadiy Tarasenko (bitcreator) wrote :

Bringing machine 'default' up with 'lxc' provider...
==> default: Importing base box 'mayflower/trusty64-puppet3'...
There was an error executing ["sudo", "/usr/local/bin/vagrant-lxc-wrapper", "lxc-create", "-B", "best", "--template", "/home/gtarasenko/.vagrant.d/gems/gems/vagrant-lxc-1.2.1/scripts/lxc-template", "--name", "workbench_default_1463040897357_18117", "--", "--tarball", "/home/gtarasenko/.vagrant.d/boxes/mayflower-VAGRANTSLASH-trusty64-puppet3/0.7.3/lxc/rootfs.tar.gz", "--config", "/home/gtarasenko/.vagrant.d/boxes/mayflower-VAGRANTSLASH-trusty64-puppet3/0.7.3/lxc/lxc-config"]

For more information on the failure, enable detailed logging by setting
the environment variable VAGRANT_LOG to DEBUG.
==> default: VM not created. Moving on...

Revision history for this message
Ibrahim Awwal (ibrahim-awwal) wrote :

For the vagrant-lxc issue, you can apply the workaround from here:

https://github.com/fgrehm/vagrant-lxc/issues/407

Specifically, define the backingstore manually in your Vagrantfile:

```
config.vm.provider :lxc do |lxc,ovrd|
    ovrd.vm.box = 'fgrehm/trusty64-lxc'
    lxc.backingstore = 'dir'
end
```

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.