[CRIU] [PATCH 0/9] CRiu Image Tool(crit)

Tycho Andersen tycho.andersen at canonical.com
Mon Oct 20 17:31:23 PDT 2014


Hi Ruslan,

On Wed, Oct 08, 2014 at 01:35:23PM +0300, Ruslan Kuprieiev wrote:
> Ruslan Kuprieiev (9):
>   tun: rename FD_TYPES__TUN to FD_TYPES__TUNF
>   protobuf: generate python modules
>   scripts: add magic-gen.py
>   pycriu: add python package
>   crit: add crit
>   crit: add crit target to Makefile and *.pyc to .gitignore
>   test: add crit test
>   crit: add setup.py
>   crit: add install-crit target to Makefile

I played around with crit a bit today, and it is already a very useful
tool, so thanks! Have you considered making the output actual parsable
json? e.g. in the cgroup case, the current output is:

#0 cgroup_entry
    sets {
      id: 2
      ctls {
        name: "blkio"
        path: "/lxc/u1"
      }
      ctls {
        name: "cpu"
        path: "/lxc/u1"
      }
    ...
    }

It could be something like,

[
  {"cgroup_entry": {"sets": {"id": 2,
                             "ctls": [{"name": "blkio",
                                       "path": "/lxc/u1"},
                                      {"name": "cpu",
                                       "path": "/lxc/u1"}]}}}]

(formatting however you want it :)

Then we could use standard json parsing tools to work with the output.

Tycho

>  .gitignore                |   1 +
>  Makefile                  |  17 ++-
>  crit                      |  75 ++++++++++++++
>  protobuf/.gitignore       |   4 +
>  protobuf/Makefile         |   3 +
>  protobuf/fdinfo.proto     |   2 +-
>  pycriu/.gitignore         |   3 +
>  pycriu/Makefile           |  15 +++
>  pycriu/__init__.py        |   2 +
>  pycriu/images/.gitignore  |   3 +
>  pycriu/images/Makefile    |  17 +++
>  pycriu/images/__init__.py |  53 ++++++++++
>  pycriu/images/images.py   | 259 ++++++++++++++++++++++++++++++++++++++++++++++
>  scripts/magic-gen.py      |  45 ++++++++
>  setup.py                  |  11 ++
>  test/Makefile             |   1 +
>  test/crit/.gitignore      |   4 +
>  test/crit/Makefile        |   9 ++
>  test/crit/loop.sh         |   4 +
>  test/crit/test.sh         |  25 +++++
>  tun.c                     |   4 +-
>  21 files changed, 550 insertions(+), 7 deletions(-)
>  create mode 100755 crit
>  create mode 100644 protobuf/.gitignore
>  create mode 100644 pycriu/.gitignore
>  create mode 100644 pycriu/Makefile
>  create mode 100644 pycriu/__init__.py
>  create mode 100644 pycriu/images/.gitignore
>  create mode 100644 pycriu/images/Makefile
>  create mode 100644 pycriu/images/__init__.py
>  create mode 100644 pycriu/images/images.py
>  create mode 100755 scripts/magic-gen.py
>  create mode 100644 setup.py
>  create mode 100644 test/crit/.gitignore
>  create mode 100644 test/crit/Makefile
>  create mode 100755 test/crit/loop.sh
>  create mode 100755 test/crit/test.sh
> 
> -- 
> 1.9.3
> 
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list