[lxc-devel] [lxc/lxc] 730e3f: clone_paths: use 'rootfs' for destination director...

GitHub noreply at github.com
Thu Jan 29 16:55:15 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: 730e3f9e2ffcc7e34c4236a37215f6be8c8cc7f3
      https://github.com/lxc/lxc/commit/730e3f9e2ffcc7e34c4236a37215f6be8c8cc7f3
  Author: Serge Hallyn <serge.hallyn at ubuntu.com>
  Date:   2015-01-29 (Thu, 29 Jan 2015)

  Changed paths:
    M src/lxc/bdev.c

  Log Message:
  -----------
  clone_paths: use 'rootfs' for destination directory

We were trying to be smart and use whatever the last part of
the container's rootfs path was.  However for block devices
that doesn't make much sense.  I.e. if lxc.rootfs = /dev/md-1,
chances are that /var/lib/lxc/c1/md-1 does not exist.

So always use the $lxcpath/$lxcname/rootfs, and if it does
not exist, try to create it.

With this, 'lxc-clone -s -o c1 -n c2' where c1 has an lvm backend
is fixed.  See https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1414771

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Acked-by: Stéphane Graber <stgraber at ubuntu.com>




More information about the lxc-devel mailing list