lxc-clone fails silently

Bug #1166870 reported by James Hunt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
High
Serge Hallyn

Bug Description

$ sudo lxc-clone -o old -n new
$ echo $?
1
$ sudo bash /usr/bin/lxc-clone -o old -n new
Tweaking configuration
Copying rootfs...
Updating rootfs...
'raring-cloned' created
$

Problem appears to be missing "|| true" in LXC_PATH= assignment in /usr/share/lxc/lxc.functions:

LXC_PATH=$(grep -v "^#" "$globalconf" 2>/dev/null | grep "[ \t]*lxcpath[ \t]*=")

The above can fail due to running via 'set -e' so needs to be something like:

LXC_PATH=$(grep -v "^#" "$globalconf" 2>/dev/null | grep "[ \t]*lxcpath[ \t]*=" || true)

Changed in lxc (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in lxc (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Serge Hallyn (serge-hallyn)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.9.0-0ubuntu2

---------------
lxc (0.9.0-0ubuntu2) raring; urgency=low

  * 0002-lxc-functions-safe-in-dash: stop lxc-clone from silently failing.
    (LP: #1166870)
 -- Serge Hallyn <email address hidden> Tue, 09 Apr 2013 12:38:02 -0500

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.