1. 09 Nov, 2016 3 commits
    • cgroups: remove isolated cpus from cpuset.cpus · a54694f8
      Christian Brauner authored
      In case the system was booted with
      
          isolcpus=n_i-n_j,n_k,n_m
      
      we cannot simply copy the cpuset.cpus file from our parent cgroup. For example,
      in the root cgroup cpuset.cpus will contain all of the cpus including the
      isolated cpus. Copying the values of the root cgroup into a child cgroup will
      lead to a wrong view in /proc/self/status: For the root cgroup
      /sys/fs/cgroup/cpuset /proc/self/status will correctly show
      
          Cpus_allowed_list:      0-1,3
      
      even though cpuset.cpus will show
      
          0-3
      
      However, initializing a subcgroup in the cpuset controller by copying the
      cpuset.cpus setting from the root cgroup will cause /proc/self/status to
      incorrectly show
      
          Cpus_allowed_list:      0-3
      
      Hence, we need to make sure to remove the isolated cpus from cpuset.cpus. Seth
      has argued that this is not a kernel bug but by design. So let us be the smart
      guys and fix this in liblxc.
      
      The solution is straightforward: To avoid having to work with raw cpulist
      strings we create cpumasks based on uint32_t bit arrays.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@canonical.com>
    • utils: add lxc_append_string() · 000dfda7
      Christian Brauner authored
      lxc_append_string() appends strings without separator. This is mostly useful
      for reading in whole files line-by-line.
      Signed-off-by: 's avatarChristian Brauner <christian.brauner@canonical.com>
    • Merge pull request #1286 from mgariepy/patch-1 · 5e8b7746
      Stéphane Graber authored
      create symlink for /var/run
  2. 08 Nov, 2016 1 commit
  3. 07 Nov, 2016 1 commit
  4. 03 Nov, 2016 7 commits
  5. 02 Nov, 2016 6 commits
  6. 31 Oct, 2016 3 commits
    • Merge pull request #1266 from tych0/do-mount-rewriting · 52e12945
      Stéphane Graber authored
      Do mount rewriting
    • log: bump LXC_LOG_BUFFER_SIZE to 4096 · ed408e66
      Tycho Andersen authored
      We need to log longer lines due to CRIU arguments.
      Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
    • c/r: explicitly emit bind mounts as criu arguments · 5f4e44a2
      Tycho Andersen authored
      We switched to --ext-mount-map auto because of "system" (liblxc) added
      mounts like the cgmanager socket that weren't in the config file. This had
      the added advantage that we could drop all the mount processing code,
      because we no longer needed an --ext-mount-map argument.
      
      The problem here is that mounts can move between hosts. While
      --ext-mount-map auto does its best to detect this situation, it explicitly
      disallows moves that change the path name. In LXD, we bind mount
      /var/lib/lxd/shmounts/$container to /dev/.lxd-mounts for each container,
      and so when a container is renamed in a migration, the name changes.
      --ext-mount-map auto won't detect this, and so the migration fails.
      
      We *could* implement mount rewriting in CRIU, but my experience with cgroup
      and apparmor rewriting is that this is painful and error prone. Instead, it
      is much easier to go back to explicitly listing --ext-mount-map arguments
      from the config file, and allow the source of the bind to change. We leave
      --ext-mount-map auto to catch any stragling (or future) system added
      mounts.
      
      I believe this should fix Launchpad Bug 1580765
      Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
  7. 30 Oct, 2016 10 commits
  8. 29 Oct, 2016 5 commits
  9. 25 Oct, 2016 4 commits