1. 17 Nov, 2015 4 commits
    • Use correct return when clone fails · dca0532e
      Christian Brauner authored
      When the clone failed we tried to destroy the container. This will lead to a
      segfault. Instead simply return -1. Also move the call to free_mnts() after the
      put label to free the user specified mounts even when we just goto put.
      Signed-off-by: 's avatarChristian Brauner <christianvanbrauner@gmail.com>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
    • Add manpage for lxc-copy · 2b47bac3
      Christian Brauner authored
      (A trivial fix for lxc-copy is included.)
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@mailbox.org>
    • Add lxc-copy executable · 43cea62d
      Christian Brauner authored
      This is a complete reimplementation of lxc-clone and lxc-start-ephemeral.
      lxc-copy merges the functionalities of lxc-clone + lxc-start-ephemeral.
      
      (1) Cloning containers:
      
      	(a) as copy:
      
      		lxc-copy -n aa -N bb
      
      	(b) as snapshot:
      
      		lxc-copy -n aa -N bb -s
      
      (2) Renaming containers:
      
      	lxc-copy -n aa -N bb -R
      
      (3) Starting ephemeral containers:
      
      Ephemeral containers are created and started by passing the flag -e /
      --ephemeral. Whenever this flag is missing a copy of the container is created.
      The flag -e / --ephemeral implies -s / --snapshot.
      
      	(a) start ephemeral container daemonized with random name:
      
      		lxc-copy -n aa -e
      
      	(b) start ephemeral container in foreground mode with random name:
      
      		lxc-copy -n aa -e -F
      
      	(c) start ephemeral container with specified name in daemonized mode:
      	    Analogous to lxc-start ephemeral containers start in daemonized
                  mode per default:
      
      		lxc-copy -n aa -N bb -e
      
      	    One can however also explicitly pass -d / --daemon:
      
      		lxc-copy -n aa -N bb -e -d
      
      	    but both commands are equivalent.
      
      	(d) start non-ephemeral container in daemonized mode:
      
      		lxc-copy -n aa -D -e
      
      	(e) start ephemeral container in daemonized mode and keep the original
      	    hostname:
      
      		lxc-copy -n aa -K -e
      
      	(f) start ephemeral container in daemonized mode and keep the
      	    MAC-address of the original container:
      
      		lxc-copy -n aa -M -e
      
      	(g) start ephemeral container with custom mounts (additional mounts can
                  be of type {bind,aufs,overlay}) in daemonized mode:
      
      		lxc-copy -n aa -e -m bind=/src:/dest:ro,aufs=/src:/dest,overlay=/src:/dest
      
      (4) Other options:
      
      	lxc-copy --help
      
      In order to create a random containername and random upper- and workdirs for
      custom mounts we use mkdtemp() to not just create the names but also directly
      create the corresponding directories. This will be safer and make the code
      considerably shorter.
      Signed-off-by: 's avatarChristian Brauner <christianvanbrauner@gmail.com>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
    • don't truncate environment sometimes in setproctitle · 058b94fe
      Tycho Andersen authored
      Instead, let's just allocate new space for the proctitle to live and point
      the kernel at that.
      
      v2: take out testing hunk
      v3: check return from realloc
      Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
  2. 12 Nov, 2015 1 commit
  3. 09 Nov, 2015 2 commits
  4. 07 Nov, 2015 1 commit
  5. 06 Nov, 2015 13 commits
  6. 30 Oct, 2015 3 commits
  7. 29 Oct, 2015 9 commits
  8. 18 Oct, 2015 1 commit
  9. 11 Oct, 2015 5 commits
  10. 07 Oct, 2015 1 commit