[lxc-devel] [lxc/lxc] 2566a1: criu: DECLARE_ARG should check for null arguments

GitHub noreply at github.com
Wed Oct 8 17:48:06 UTC 2014


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

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  criu: DECLARE_ARG should check for null arguments

This is in preparation for the cgroups creation work, but also probably just a
good idea in general. The ERROR message is handy since we print line nos. it
will to give people an indication of what arg was null.

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


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

  Changed paths:
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  restore: Hoist handler to function level

On Tue, Oct 07, 2014 at 07:33:07PM +0000, Tycho Andersen wrote:
> This commit is in preparation for the cgroups create work, since we will need
> the handler in both the parent and the child. This commit also re-works how
> errors are propagated to be less verbose.

Here is an updated version:

>From 941623498a49551411ccf185146061f3f37d3a67 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.andersen at canonical.com>
Date: Tue, 7 Oct 2014 19:13:51 +0000
Subject: [PATCH 1/2] restore: Hoist handler to function level

This commit is in preparation for the cgroups create work, since we will need
the handler in both the parent and the child. This commit also re-works how
errors are propagated to be less verbose.

v2: rename error to has_error, handle it correctly, and remove some diff noise

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


  Commit: 2ba7a4298964e618e3a81a42187174b9b7921764
      https://github.com/lxc/lxc/commit/2ba7a4298964e618e3a81a42187174b9b7921764
  Author: Tycho Andersen <tycho.andersen at canonical.com>
  Date:   2014-10-08 (Wed, 08 Oct 2014)

  Changed paths:
    M src/lxc/cgfs.c
    M src/lxc/cgmanager.c
    M src/lxc/cgroup.c
    M src/lxc/cgroup.h
    M src/lxc/lxccontainer.c

  Log Message:
  -----------
  restore: create cgroups for criu

Previously, we let criu create the cgroups for a container as it was restoring
things. In some cases (i.e. migration across hosts), if the container being
migrated was in /lxc/u1-3, it would be migrated to the target host in
/lxc/u1-3, even if there was no /lxc/u1-2 (or worse, if there was already an
alive container in u1-3).

Instead, we use lxc's cgroup_create, and then tell criu where to restore to.

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


Compare: https://github.com/lxc/lxc/compare/9a64d3cf9fae...2ba7a4298964


More information about the lxc-devel mailing list