lxc-create (or clone) of cloud template with '--cloud' exits failure

Bug #1237543 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Low
Serge Hallyn

Bug Description

$ sudo lxc-create -n lxc-precise-server-pristine -t ubuntu-cloud -- -r precise -a amd64 -C
ubuntu-cloudimg-query is /usr/bin/ubuntu-cloudimg-query
wget is /usr/bin/wget
Extracting container rootfs
lxc-create: container creation template for lxc-precise-server-pristine failed

lxc-create: Error creating container lxc-precise-server-pristine

The issue is silly.
/usr/share/lxc/hooks/ubuntu-cloud-prep does nothing because of the --cloud (-C) arg, except for 'debug()'
but since no '-v' flags were provided, it exited non-zero.

fix is to fix debug()

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: lxc 1.0.0~alpha1-0ubuntu8
ProcVersionSignature: Ubuntu 3.11.0-9.16-generic 3.11.2
Uname: Linux 3.11.0-9-generic x86_64
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
Date: Wed Oct 9 13:47:51 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2011-10-19 (721 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
MarkForUpload: True
SourcePackage: lxc
UpgradeStatus: Upgraded to saucy on 2013-05-20 (142 days ago)
defaults.conf:
 lxc.network.type = veth
 lxc.network.link = lxcbr0
 lxc.network.flags = up
lxcsyslog:

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Scott Moser (smoser) wrote :

$ diff -u /usr/share/lxc/hooks/ubuntu-cloud-prep.dist /usr/share/lxc/hooks/ubuntu-cloud-prep
--- /usr/share/lxc/hooks/ubuntu-cloud-prep.dist 2013-10-09 17:42:03.138819999 +0000
+++ /usr/share/lxc/hooks/ubuntu-cloud-prep 2013-10-09 17:42:10.098820001 +0000
@@ -16,7 +16,7 @@
 VERBOSITY="0"

 error() { echo "$@" 1>&2; }
-debug() { [ "$VERBOSITY" -ge "$1" ] || return; shift; error "$@"; }
+debug() { [ "$VERBOSITY" -ge "$1" ] || return 0; shift; error "$@"; }
 fail() { [ $# -eq 0 ] || error "$@"; exit 1; }

 prep_usage() {

Changed in lxc (Ubuntu):
status: New → In Progress
assignee: nobody → Serge Hallyn (serge-hallyn)
Scott Moser (smoser)
Changed in lxc (Ubuntu):
importance: Undecided → Low
Changed in lxc (Ubuntu):
status: In Progress → Fix Released
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.