1. 13 Mar, 2013 2 commits
  2. 12 Mar, 2013 3 commits
  3. 11 Mar, 2013 6 commits
  4. 07 Mar, 2013 1 commit
  5. 06 Mar, 2013 5 commits
  6. 05 Mar, 2013 1 commit
  7. 04 Mar, 2013 7 commits
    • cgroup: improve support for multiple lxcpaths (v3) · ae5c8b8e
      Serge Hallyn authored
      Add a monitor command to get the cgroup for a running container.  This
      allows container r1 started from /var/lib/lxc and container r1 started
      from /home/ubuntu/lxcbase to pick unique cgroup directories (which
      will be /sys/fs/cgroup/$subsys/lxc/r1 and .../r1-1), and all the lxc-*
      tools to get that path over the monitor at lxcpath.
      
      Rework the cgroup code.  Before, if /sys/fs/cgroup/$subsys/lxc/r1
      already existed, it would be moved to 'deadXXXXX', and a new r1 created.
      Instead, if r1 exists, use r1-1, r1-2, etc.
      
      I ended up removing both the use of cgroup.clone_children and support
      for ns cgroup.  Presumably we'll want to put support for ns cgroup
      back in for older kernels.  Instead of guessing whether or not we
      have clone_children support, just always explicitly do the only thing
      that feature buys us - set cpuset.{cpus,mems} for newly created cgroups.
      
      Note that upstream kernel is working toward strict hierarchical
      limit enforcements, which will be good for us.
      
      NOTE - I am changing the lxc_answer struct size.  This means that
      upgrades to this version while containers are running will result
      in lxc_* commands on pre-running containers will fail.
      
      Changelog: (v3)
         implement cgroup attach
         fix a subtle bug arising when we lxc_get_cgpath() returned
           STOPPED rather than -1 (STOPPED is 0, and 0 meant success).
         Rename some functions and add detailed comments above most.
         Drop all my lxc_attach changes in favor of those by Christian
           Seiler (which are mostly the same, but improved).
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • c api: send lxcpath to destroy command · 7f597314
      Serge Hallyn authored
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • userns: handle delayed write errors at fclose · e4ccd113
      Serge Hallyn authored
      As Kees pointed out, write() errors can be delayed and returned as
      close() errors.  So don't ignore error on close when writing the
      userns id mapping.
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • af_unix: make sure to keep useful errno · dba104c8
      Serge Hallyn authored
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • lxc-destroy: add --lxc-path argument · 65a2d6b2
      Serge Hallyn authored
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>
    • lxc_attach: fix break with user namespaces (v3) · b858bedf
      Christian Seiler authored
      When you clone a new user_ns, the child cannot write to the fds
      opened by the parent.  Hnadle this by doing an extra fork.  The
      grandparent hangs around and waits for its child to tell it the
      pid of of the grandchild, which will be the one attached to the
      container.  The grandparent then moves the grandchild into the
      right cgroup, then waits for the child who in turn is waiting on
      the grandchild to complete.
      
      Secondly, when attaching to a new user namespace, your old uid is
      not valid, so you are uid -1.  This patch simply does setid+setuid
      to 0 if that is the case.  We probably want to be smarter, but
      for now this allows lxc-attach to work.
      Signed-off-by: 's avatarChristian Seiler <christian@iwakd.de>
  8. 01 Mar, 2013 4 commits
  9. 28 Feb, 2013 8 commits
  10. 22 Feb, 2013 2 commits
  11. 21 Feb, 2013 1 commit