1. 15 Nov, 2016 1 commit
    • lxc-checkpoint: enable dirty memory tracking in criu · 9f99a33f
      Adrian Reber authored
      CRIU supports dirty memory tracking to take incremental checkpoints.
      Incremental checkpoints are one way of reducing downtime during
      migration. The first checkpoint dumps all the memory pages and the
      second (and third, and fourth, ...) only dumps pages which have changed.
      
      Most of the necessary code has already been implemented. This just adds
      the existing functionality to lxc-checkpoint:
      
        -p, --pre-dump            Only pre-dump the memory of the container.
                                  Container keeps on running and following
                                  checkpoints will only dump the changes.
        --predump-dir=DIR         path to images from previous dump (relative to -D)
      
      The following is an example from a container running CentOS 7 with psql
      and tomcat:
      
       # lxc-checkpoint -n c7 -D /tmp/cp -p
      Container keeps on running
       # du -h /tmp/cp
       229M	/tmp/cp
      Sync initial checkpoint to destination
       # rsync -a /tmp/cp host2:/tmp/
      Sync file-system
       # rsync -a /var/lib/lxc/c7 host2:/var/lib/lxc/
      Final dump; container is stopped
       # lxc-checkpoint -n c7 -D /tmp/cp --predump-dir=../cp -s
       # du -h /tmp/cp2
       90M	/tmp/cp2
      
      After transferring the second (incremental checkpoint) and the changes
      to the container's file system the container can be restored on the
      second host by pointing lxc-checkpoint to the second checkpoint
      directory:
      
       # lxc-checkpoint -n c7 -D /tmp/cp2 -r
      Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
  2. 14 Nov, 2016 1 commit
  3. 13 Nov, 2016 1 commit
  4. 12 Nov, 2016 6 commits
  5. 11 Nov, 2016 1 commit
  6. 10 Nov, 2016 5 commits
  7. 09 Nov, 2016 1 commit
  8. 08 Nov, 2016 1 commit
  9. 07 Nov, 2016 1 commit
  10. 03 Nov, 2016 7 commits
  11. 02 Nov, 2016 6 commits
  12. 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>
  13. 30 Oct, 2016 6 commits