[lxc-devel] [lxc/lxc] bbd4e1: c/r: factor out network dump/restore code

GitHub noreply at github.com
Fri Oct 17 13:22:10 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: bbd4e13ea5c23480968bad1934a44db50d674d76
      https://github.com/lxc/lxc/commit/bbd4e13ea5c23480968bad1934a44db50d674d76
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  c/r: factor out network dump/restore code

Break the monolithic ->checkpoint and ->restore functions into smaller ones.
This is in preparation for the checkpoint/restore tty work, which has a similar
need to dump information outside of criu.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: fed29fad60a06389f10f91fe8c15c8ca0ff50aa1
      https://github.com/lxc/lxc/commit/fed29fad60a06389f10f91fe8c15c8ca0ff50aa1
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M src/lxc/lxc-restore-net
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  c/r: refactor the way we pass data to criu/scripts

We previously wrote a bunch of files (eth*, veth*, and bridge*) as hard coded
files which we used as the names of interfaces to restore via criu's
--veth-pair. This meant that if people, e.g. gave a different bridge on their
new host, we would use our saved bridge in bridge* and try to restore to the
wrong bridge. Instead, we can just generate a new veth id (if the user hasn't
provided one), and use whatever the user configured values for the interface
name and bridge are.

This allows people to switch the bridge that they restore onto simply by
migrating the rootfs and config, and then changing the bridge name in the
container's configuration before running lxc-checkpoint.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


  Commit: e311a562356f18e960fef5a1b711673a85d240b4
      https://github.com/lxc/lxc/commit/e311a562356f18e960fef5a1b711673a85d240b4
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-10-17 (Fri, 17 Oct 2014)

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  c/r: use sizeof instead of magic numbers

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>


Compare: https://github.com/lxc/lxc/compare/e5848d395cb4...e311a562356f


More information about the lxc-devel mailing list