1. 16 Apr, 2013 2 commits
  2. 15 Apr, 2013 13 commits
  3. 12 Apr, 2013 3 commits
  4. 11 Apr, 2013 2 commits
    • Fix up struct lxc_container locking · 43d1aa34
      Serge Hallyn authored
      1. in container_free, set c->privlock to NULL before calling
      sem_destroy, to prevent a window where another thread could call
      sem_wait(c->privlock) while c->privlock is not NULL but is already
      destroyed.
      
      2. in container_get, check for numthreads < 0 before calling lxclock.
      Once numthreads is 0, it never goes back up.
      
      Following is a comment added to lxccontainer.c:
      
      /*
       * Consider the following case:
      freer                         |    racing get()er
      ==================================================================
      lxc_container_put()           |   lxc_container_get()
      \ lxclock(c->privlock)        |   c->numthreads < 1? (no)
      \ c->numthreads = 0           |   \ lxclock(c->privlock) -> waits
      \ lxcunlock()                 |   \
      \ lxc_container_free()        |   \ lxclock() returns
                                    |   \ c->numthreads < 1 -> return 0
      \ \ (free stuff)              |
      \ \ sem_destroy(privlock)     |
      
       * When the get()er checks numthreads the first time, one of the following
       * is true:
       * 1. freer has set numthreads = 0.  get() returns 0
       * 2. freer is between lxclock and setting numthreads to 0.  get()er will
       *    sem_wait on privlock, get lxclock after freer() drops it, then see
       *    numthreads is 0 and exit without touching lxclock again..
       * 3. freer has not yet locked privlock.  If get()er runs first, then put()er
       *    will see --numthreads = 1 and not call lxc_container_free().
      */
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Acked-by: 's avatarSeth Arnold <seth.arnold@canonical.com>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • python: Fix memory management · e649c803
      Stéphane Graber authored
      Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
  5. 10 Apr, 2013 7 commits
  6. 09 Apr, 2013 1 commit
  7. 05 Apr, 2013 2 commits
  8. 01 Apr, 2013 6 commits
  9. 28 Mar, 2013 1 commit
  10. 27 Mar, 2013 3 commits
    • lxc.sgml.in: Fix typo in man page. · bb787bc5
      Matthias Brugger authored
      This patch fixes a small typo in the man page.
      Signed-off-by: 's avatarMatthias Brugger <matthias.bgg@gmail.com>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
    • lxc-clone: support 'permanent ephemeral' containers · 48853811
      Serge Hallyn authored
      All of this needs a rewrite/redesign, and that will be coming (details
      below), but for now
      
      You can start 'non-ephemeral ephemeral' containers using
      
      	lxc-start-ephemeral -o oldname -n newname --keep-data
      
      When you shut that down, the container stick around and can be
      restarted.  Now lxc-clone will recognize such a container by the
      presence of the delta0/ which contains the read-write overlayfs
      layer.  This means you can do incremental development of containers,
      i.e.
      
      	lxc-create -t ubuntu -n r1
      	lxc-start-ephemeral --keep-data -o r1 -n r1-2
      	# make some changes, poweroff
      	lxc-clone -o r1-2 -n r1-3
      	# make some changes...
      	lxc-clone -o r1-3 -n r1-4
      	# etc...
      
      Now, as for design changes...  from a higher level
      
      	1. lxc-clone should be re-written in c and exported through the
      	   api.
      	2. lxc-clone should support overlayfs and aufs
      	3. lxc-start-ephemeral should become a thin layer which clones a
      	   container, starts and stops and destroys it.
      
      at a lower level,
      
      	1. the api should support container->setup_mounts
      	2. lxc-clone should be written as a set of backend classes which
      	   can copy mounts to each other.  So when you load a container
      	   which is lvm-backed, it creates a lvm backend class.  That
      	   class instance can be converted into a loopback or qemu-nbd
      	   or directory backed class.  A directory-backed class can be
      	   converted into a overlayfs or aufs backed class, which (a)
      	   uses the dirctory-backed class as the read-only base, and (b)
      	   pins the base container (so it can't be deleted until all
      	   snapshots are deleted).
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
      Acked-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
    • lxc-start-ephemeral: Implement -n to match manpage · f63b1efd
      Stéphane Graber authored
      The -n/--name option of lxc-start-ephemeral was never implemented
      even though it was documented in the manpage.
      Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
      Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>