[CRIU] Criu docker apache

Ross Boucher rboucher at gmail.com
Fri Jun 24 08:26:28 PDT 2016


I recommend taking a look at this code, which implements checkpointing in
Docker containers:

https://github.com/opencontainers/runc/blob/master/libcontainer/container_linux.go#L545

It uses the API so there's some mental translation to be done if you really
want to use the command line. I think what you're missing is the "--root"
flag, which should be the rootfs of your container.

Alternatively, you should consider just using native docker support, which
is available on my github repository:

https://github.com/boucher/docker/releases/tag/v1.10_2-16-16-experimental
(or, the docker-checkpoint-restore branch if you need docker 1.12, but
you'll need to build it yourself)

-Ross

On Fri, Jun 24, 2016 at 1:10 AM Konstantin Kolias <kkolias at gmu.edu> wrote:

> Hello all,
>
>
>
> I get an error with something really basic: trying to checkpoint restore
> an apache container (docker).
>
>
>
>
>
> My settings:
>
> Ubuntu 16.04 (on amazon vm)
>
> Docker 1.11.2
>
> Criu 2.0
>
> Created a container debian + apache.
>
> Made it run with:  sudo docker run -d -p 8080:80 apache
> /usr/sbin/apache2ctl –X
>
>
>
> I did this in an attempt to create a single process apache.
>
>
>
> Then attempted to take a checkpoint:
>
> sudo criu dump -o dump.log -v4 -t 329 \
>
> -D
> /tmp/img/0d97f03fb4880e0d65f97974e7fbef43735e4283acf47c1b7cc705e10e7e6759 \
>
> --ext-mount-map /etc/resolv.conf:/etc/resolv.conf \
>
> --ext-mount-map /etc/hosts:/etc/hosts \
>
> --ext-mount-map /etc/hostname:/etc/hostname \
>
> --ext-mount-map /.dockerinit:/.dockerinit \
>
> --ext-mount-map /sys/fs/cgroup/memory:/sys/fs/cgroup/memory \
>
> --ext-mount-map /sys/fs/cgroup/cpu,cpuacct:/sys/fs/cgroup/cpu,cpuacct \
>
> --ext-mount-map /sys/fs/cgroup/freezer:/sys/fs/cgroup/freezer \
>
> --ext-mount-map /sys/fs/cgroup/cpuset:/sys/fs/cgroup/cpuset \
>
> --ext-mount-map /sys/fs/cgroup/perf_event:/sys/fs/cgroup/perf_event \
>
> --ext-mount-map /sys/fs/cgroup/devices:/sys/fs/cgroup/devices \
>
> --ext-mount-map /sys/fs/cgroup/hugetlb:/sys/fs/cgroup/hugetlb \
>
> --ext-mount-map
> /sys/fs/cgroup/net_cls,net_prio:/sys/fs/cgroup/net_cls,net_prio \
>
> --ext-mount-map /sys/fs/cgroup/blkio:/sys/fs/cgroup/blkio \
>
> --ext-mount-map /sys/fs/cgroup/pids:/sys/fs/cgroup/pids \
>
> --ext-mount-map /sys/fs/cgroup/systemd:/sys/fs/cgroup/systemd \
>
> --manage-cgroups \
>
> --evasive-devices
>
>
>
>
>
> I get an error:
>
> Error (mount.c:740): mnt: 292:./etc/resolv.conf doesn't have a proper root
> mount
>
> (00.008457) Unlock network
>
> (00.008459) Running network-unlock scripts
>
> (00.009719) Unfreezing tasks into 1
>
> (00.009728)     Unseizing 329 into 1
>
> (00.009739)     Unseizing 349 into 1
>
> (00.009845) Error (cr-dump.c:1600): Dumping FAILED.
>
>
>
> Can anyone explain the possible reasons for this error and the nature of
> the problem?
>
>
>
> It’s the first time I post to this mailing list so I don’t know if it’s
> proper to post my lengthy dump.log file.
>
>
>
> Regards
>
> Costas
>
>
>
>
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20160624/f7ba8a04/attachment.html>


More information about the CRIU mailing list