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>
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)
--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>
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)
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)
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>
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>
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>
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>
This is work in progress, integrating C/R support from
https://github.com/SaiedKazemi/docker/tree/cr into the
new libcontainer and nsinit.
Signed-off-by: Saied Kazemi <saied@google.com>
Also use pipes for non tty so that the parent's tty of the nsinit
process does not leak into the conatiner.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This adds a new env var for identifying the internal sync pipe that
libcontainer uses to sync with the container and parent process. This
replaces #496 to allow the user to add additional files to the processes
and not take over fd 3 for all containers.
Closes#496
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
For some reason when the supervisor of a container is PID1 the parent
death signal was being delivered to the container's init process even if
it did not die. Also the ppid() will return 1 for a container running
in the pid namespace of it's parent and the parent is pid1.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
We only have libcontainer.Container on Docker side, can't change `config`
in linuxContainer, pass config to libcontainer so we can change config of
container.
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
currently genericError constructors require not-nil error to be able to read
its Error() message
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
I think this is more convenient because for working with namespaces we
using configs.NamespaceType.
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
Currently we have a problem when buffers are used for std file
descriptors. These buffers are filled from goroutines (Cmd.goroutine),
and we need to wait them to be sure that all data have been copied.
Signed-off-by: Andrew Vagin <avagin@openvz.org>