Michael Crosby
5f69c650e5
Merge pull request #605 from ZJU-SEL/update_nsinit_readme
...
Update nsinit readme for C/R
2015-05-28 10:22:13 -07:00
Antonio Murdaca
81444369c6
Add mutex in Manager to read from m.Paths
...
Signed-off-by: Antonio Murdaca <me@runcom.ninja>
2015-05-28 12:09:27 +02:00
Daniel, Dao Quang Minh
31496b37b5
Merge pull request #592 from Mashimiao/cgroup-memory-enchancement
...
cgroup memory: Enchance stats support of memory
2015-05-28 13:57:00 +08:00
Ma Shimiao
4002033269
hugetlb: Add support of Set and GetStats function
...
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-05-28 13:09:49 +08:00
Ma Shimiao
11d2aa07a0
cgroup memory: Enchance stats support of memory
...
Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
2015-05-28 09:09:01 +08:00
Mrunal Patel
97f4592aa8
Merge pull request #606 from kvasdopil/freebsd-compile
...
Process.go can compile on FreeBSD
2015-05-27 11:24:21 -07:00
Alexey Guskov
6bdfd8fcfd
process.go can compile on FreeBSD
...
Signed-off-by: Alexey Guskov <lexag@mail.ru>
2015-05-27 15:41:50 +03:00
jianbosun
f177920dc3
Update nsinit readme for C/R
...
Signed-off-by: Sun Jianbo <wonderflow@zju.edu.cn>
2015-05-26 16:39:35 +08:00
Michael Crosby
8c6ed5ebe0
Merge pull request #599 from avagin/test
...
integration: don't ignore exit codes of test processes
2015-05-21 13:35:02 -07:00
Michael Crosby
35d1c0e479
Merge pull request #479 from docker/criu
...
WIP: Add Checkpoint and Restore support to libcontainer
2015-05-21 13:32:40 -07:00
Michael Crosby
703d9a1554
Merge pull request #600 from boucher/criu-readme
...
README example for using checkpoint/restore.
2015-05-21 10:02:09 -07:00
boucher
fee819ca06
README example for using checkpoint/restore.
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 17:59:19 -07:00
Michael Crosby
e7542142a8
Remove logging for checkpoint code
...
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-05-20 15:48:07 -07:00
Andrey Vagin
5f6ea0e8a4
cr: fix parsing of criu version
...
The format of criu version is X.Y[.Z]. The current code can not parse X.Y,
because scanf returns the "input does not match format" error.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:19:30 -07:00
boucher
206b5e6f1d
First attempt at an integration test for checkpoint/restore.
...
Adds iptables as a requirement of criu in the Dockerfile.
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
boucher
b3ec1fce19
Add steps to install criu to the Dockerfile
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
boucher
bfb093aacd
Allow restore to actually exec/create the libcontainer, rather than requiring that one already exists.
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
Andrey Vagin
a16d7f1b7d
container: don't use c.initProcess before it's set
...
container.Checkpoint() doesn't clear c.initProcess and
it's used on restore.
Signed-off-by: Andrew Vagin <avagin@openvz.org>
2015-05-20 15:19:30 -07:00
boucher
420180a10b
Require criu 1.5.2 rather than 1.5.1
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
boucher
7c138ebbee
Reformat some error handling code and declare descriptor filename as a const.
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
Andrey Vagin
7d32656ee7
cr: handle all external descriptros in ct.Restore()
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:19:30 -07:00
boucher
78a21b77b2
Fix formatting issues, and missing test methods.
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:30 -07:00
Andrey Vagin
8f0cad54ac
Don't fix the size of the ExternalDescriptors array
...
In a future we may want to have more external descriptors.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:19:30 -07:00
Andrey Vagin
655f1ce09c
Rename StdFds into ExternalDescriptors
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:19:30 -07:00
Andrey Vagin
6ecf32c234
Restore StdFds from the state file
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:19:29 -07:00
boucher
3d59a7fe8b
Refactor saving fds slightly, set the restored process fds correctly.
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:29 -07:00
boucher
38635c5a11
Move the std_fds into initProcess, and expose them in container's State
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:19:29 -07:00
boucher
129280ac62
Write the fd info to the image directory during a checkpoint,
...
and restore with the written info from a given image directory.
Also, write completely root independent ext_mount info.
These changes enable checkpointing in one container and then restoring
into a completely new container.
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:18:56 -07:00
Hui Kang
46dd56ba07
Change back to --page-server, PageServer should be in CriOpts struct
...
Docker-DCO-1.1-Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
2015-05-20 15:18:56 -07:00
Hui Kang
1d89a25aec
Fix a nil pointer bug when doing local checkpoint
...
Docker-DCO-1.1-Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
2015-05-20 15:18:56 -07:00
Hui Kang
67636f13fb
Change --page-server to --PageServer
...
Docker-DCO-1.1-Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
2015-05-20 15:18:56 -07:00
Hui Kang
d278b830d9
Change criu command line format for page server
...
--page-server ADDRESS:PORT
Docker-DCO-1.1-Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
2015-05-20 15:18:56 -07:00
root
7a012fe3b5
Allow dumped image to be transferred to a criu page server
...
--page-server to specify the IP address of criu page server
--port to specify the port of the criu page server
Docker-DCO-1.1-Signed-off-by: Hui Kang <hkang.sunysb@gmail.com>
2015-05-20 15:18:56 -07:00
boucher
4fc7543317
Don't write a "checkpoint" file if the process is left running.
...
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:18:56 -07:00
boucher
a8d5fdf1fd
Add support for providing options to CRIU.
...
In order to do more complex things with checkpointing
and restoring of containers it's necessary to have
control over where the image files are being saved
and whether or not to kill the running process. It's
possible more flags will be wanted in the future.
Some things probably should always be auto-configured
by libcontainer though.
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:18:56 -07:00
Andrey Vagin
cbe747d989
cr: add a comment about bind-mounting root in a tmp dir
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
eaa35f552e
cr: add network support
...
We need to enumirate all veth devices on restore and handle
{un,}lock-network notifications.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
boucher
032aca342e
Exclude the root path from mount point paths.
...
This change was necessary for me to get criu/libcontainer running inside of Docker.
Docker-DCO-1.1-Signed-off-by: Ross Boucher <rboucher@gmail.com> (github: boucher)
2015-05-20 15:18:56 -07:00
Andrey Vagin
328786f70e
cr: don't remove images after restore
...
This code was added when images were saved in a factory root directory and in
addition this directory was used as a flag.
Now an user can decide when images can be removed.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
553b8be2d0
cr: prepare a container root
...
CRIU has following requirements for a container root:
* it is a mount point
* a parent mount point isn't over-mounted
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
39795424db
cr: user criu swrk to dump CT
...
criu swrk allows to rollback if the /ROOT/CRID/checkpoint
file can't be created. In a future it will be used for locking network.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
6f1d940b8e
cr: split the Restore function
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
65f9b1bd84
cr: handle criu notifications in a separate function
...
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
522f7b36ff
cr: Add an ability to specify path for images
...
the emptye /ROOT/CTID/checkpoint file is created to
support the Checkpointed state.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
5fb0019c45
Add the Checkpointed state
...
I don't like the current logic in ct.Destroy(). I think ct.Destroy
must destoy ct or return an error.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
f5fad10193
protobuf: workaround a go vet error
...
vendor/src/github.com/golang/protobuf/proto/all_test.go:1284: result of fmt.Sprintf call not used
Do we really need to execute go vet for vendor? I don't find how to exclude them.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
5231fbf143
Dockerfile: don't call go get
...
Everything must be in vendor/
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:56 -07:00
Andrey Vagin
5df3a07b5f
cr: split work and image directories
...
This directory can be removed when criu completes.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:55 -07:00
Andrey Vagin
e0f87e2f23
cr: check criu version
...
CRIU version must be 1.5.1 or higher
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:55 -07:00
Andrey Vagin
b836046422
cr: use the RPC protocol for communication with criu
...
criu swrk is a special mode when we don't want to execute a service,
but want to use RPC.
Here is more details:
http://lists.openvz.org/pipermail/criu/2015-March/019400.html
Another good feature of this mode is that we don't need to create
action scripts and we will be able to remove the hack with saving StdFds.
criu swrk is supported starting with CRIU 1.5.1.
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-05-20 15:18:55 -07:00