[lxc-devel] [lxc/lxc] b5b12b: criu: add feature check capability

GitHub noreply at github.com
Thu Dec 14 20:06:19 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/lxc/lxc
  Commit: b5b12b9e75935836213b7637d018c93763183945
      https://github.com/lxc/lxc/commit/b5b12b9e75935836213b7637d018c93763183945
  Author: Adrian Reber <areber at redhat.com>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M src/lxc/criu.c
    M src/lxc/criu.h
    M src/lxc/lxccontainer.c
    M src/lxc/lxccontainer.h

  Log Message:
  -----------
  criu: add feature check capability

For migration optimization features like pre-copy or post-copy migration
the support cannot be determined by simply looking at the CRIU version.
Features like that depend on the architecture/kernel/criu combination
and CRIU offers a feature checking interface to query if it is
supported.

This adds a LXC interface to query CRIU for those feature via the
migrate() API call. For the recent pre-copy migration support in LXD
this can be used to automatically detect if pre-copy migration should be
used.

In addition to the existing migrate() API commands this adds a new
command: 'MIGRATE_FEATURE_CHECK'.

The migrate_opts{} structure is extended by the member features_to_check
which is a bitmask defining which CRIU features should be queried.

Currently only the querying of the features FEATURE_MEM_TRACK and
FEATURE_LAZY_PAGES is supported.

Signed-off-by: Adrian Reber <areber at redhat.com>


  Commit: 739ef90c8233c7c2dd76e15985521bf05e6dc8e4
      https://github.com/lxc/lxc/commit/739ef90c8233c7c2dd76e15985521bf05e6dc8e4
  Author: Adrian Reber <areber at redhat.com>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M src/tests/Makefile.am
    A src/tests/criu_check_feature.c

  Log Message:
  -----------
  criu: add a test case for the criu feature check support

This adds a simple test case which verifies that the new migrate() API
command 'MIGRATE_FEATURE_CHECK' works as expected.

If a feature does not exist on the currently running
architecture/kernel/criu combination it does not report an error as this
is a valid scenario.

Signed-off-by: Adrian Reber <areber at redhat.com>


  Commit: 124015286692cd0130fe32a7683a15c34bd72f21
      https://github.com/lxc/lxc/commit/124015286692cd0130fe32a7683a15c34bd72f21
  Author: Christian Brauner <christian.brauner at ubuntu.com>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M src/lxc/criu.c
    M src/lxc/criu.h
    M src/lxc/lxccontainer.c
    M src/lxc/lxccontainer.h
    M src/tests/Makefile.am
    A src/tests/criu_check_feature.c

  Log Message:
  -----------
  Merge pull request #2035 from adrianreber/master

criu: add feature check capability


Compare: https://github.com/lxc/lxc/compare/81b10e37c959...124015286692


More information about the lxc-devel mailing list