• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

xemul / criu / 881 / 1
64%
master: 66%

Build:
Build:
LAST BUILD BRANCH: criu-dev
DEFAULT BRANCH: master
Ran 13 Mar 2017 06:46PM UTC
Files 216
Run time 30s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

13 Mar 2017 06:33PM UTC coverage: 63.149% (-0.002%) from 63.151%
TR_ARCH=local GCOV=1

push

travis-ci

avagin
phaul: Go library for live migration

The API is as simple as

	srv := MakePhaulServer(config)
	cln := MakePhaulClient(local, remote, config)
	cln.Migrate()

* config is the PhaulConfig struct that contains pid to migrate,
  memory transfer channel (file descriptor) that phaul can use
  to send/receive memory and path to existing directory where
  phaul can put intermediate files and images.

* local is PhaulLocal interface with (for now) the single method
  - DumpCopyRestore(): method that phaul calls when it's time
    to do engine-specific dump, images copy and restore on
    the destination side.

  Few words about the latter -- we've learned, that different
  engines have their own way to call CRIU to dump a container,
  so phaul, instead of dumping one by its own, lets the caller
  do it. To keep-up with pre-dump stuff, the client should
  not forget to do three things:

  - set the TrackMem option to true
  - set the ParentImg to the passed value
  - set the Ps (page server) channel with 'config.Memfd'

  The criu object is passed here as well, so that caller can
  call Dump() on it (once we have keep_open support in libcriu
  this will help to avoid additional criu execve).

  The method also should handle the PostDump notification and
  do images-copy and restore in it. Not sure how to wrap this
  into phaul better.

* remote is PhaulRemote interface whose method should be called
  on the dst side on the PhaulServer object using whatever RPC
  the caller finds acceptable.

As a demonstration the src/test/main.go example is attached. To
see how it goes 'make' it, then start the 'piggie $outfile'
proggie and run 'test $pid' command. The piggie will be, well,
live migrated locally :) i.e. will appear as a process with
different pid (it lives in a pid namespace).

Changes since v2:

* Reworked the API onto local/remote/config scheme
* Added ability to configure diretory for images
* Re-used server side Criu object for final restore

Changes since v1:

* Supported keep_open-s for pre-dumps
* Added code comments about interface
* Simplified the example code

Further plans for this are

- move py p.haul to use this compiled library
- add post-copy (lazy pages) support (with Mike help)
- add image-cache and image-proxy (with Ridrigo help)
- add API/framwork for FS migration

Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>

18562 of 29394 relevant lines covered (63.15%)

54902.19 hits per line

Source Files on job 881.1 (TR_ARCH=local GCOV=1)
  • Tree
  • List 0
  • Changed 119
  • Source Changed 0
  • Coverage Changed 119
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 881
  • Travis Job 881.1
  • fee639b5 on github
  • Prev Job for TR_ARCH=local GCOV=1 on criu-dev (#880.1)
  • Next Job for TR_ARCH=local GCOV=1 on criu-dev (#882.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc