[CRIU] Migrating docker container between two hosts - CGroup: device busy

Andrei Vagin avagin at virtuozzo.com
Thu Jun 1 22:39:45 MSK 2017


On Sun, May 28, 2017 at 11:30:04AM +0200, SreeKrishna wrote:
> Hi Guys,
> 
> I'm a CRIU noob and attempting to migrate a docker container between two hosts.
> however, I get an error stating: 
> 
> 
>     Error (criu/cgroup.c:1642): cg:     Can't mount controller dir
>     .criu.cgyard.g3irYd/cpu,cpuacct: Device or resource busy

Could you show /proc/self/cgroup and /proc/self/mountinfo from both
hosts?

Thanks,
Andrei

> 
> 
> 
> Here are my specs:
> 
> Host 1:
> 
> 
> 
>     ➜  ~ uname -a       
>     Linux ip-172-31-16-41 4.4.0-77-generic #98-Ubuntu SMP Wed Apr 26 08:34:02
>     UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
>     ➜  ~ 
>     ➜  ~ docker -v      
>     Docker version 17.03.1-ce, build c6d412e
>     ➜  ~ 
>     ➜  ~ 
>     ➜  ~ sudo criu check
>     Warn  (criu/autofs.c:77): Failed to find pipe_ino option (old kernel?)
>     Looks good.
> 
> 
> Host 2:
> 
> 
> 
>     ➜  ~ uname -a
>     Linux mininet-vm 4.2.0-27-generic #32~14.04.1-Ubuntu SMP Fri Jan 22
>     15:32:26 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
>     ➜  ~ 
>     ➜  ~ docker -v
>     Docker version 17.03.1-ce, build c6d412e
>     ➜  ~ 
>     ➜  ~ sudo criu check
>     Looks good.
> 
> 
> 
> Here's how to reproduce it:
> 
> Host 1:
> 
> 
> 
>     ➜  ~ docker run -d --name looper --security-opt seccomp:unconfined busybox
>     \
>              /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep
>     1; done'
>     d830494e8bca353861c734a12854145fd9399b31f173a931e6cfdb529988dd06
>     ➜  ~ docker checkpoint create --checkpoint-dir=/tmp looper cp1
> 
> 
> 
> Then I copy the /tmp/cp1 to the host 2.
> 
> 
> Host 2:
> 
> 
>     ➜  ~ docker create --name looper2 --security-opt seccomp:unconfined busybox
>     \
>              /bin/sh -c 'i=0; while true; do echo $i; i=$(expr $i + 1); sleep
>     1; done'
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     ➜  ~ docker start --checkpoint-dir=/tmp --checkpoint=cp1 looper2          
>         
>     Error response from daemon: oci runtime error: criu failed: type RESTORE
>     errno 0
>     log file: /tmp/cp1/criu.work/restore-2017-05-26T13:15:21-07:00/restore.log
> 
> 
> 
> Here's the error log
> 
> 
>     ➜  ~ sudo tail /tmp/cp1/criu.work/restore-2017-05-26T13:15:21-07:00/
>     restore.log
>     (00.000427) cg: rewriting docker/d830494e8bca353861c734a1285414
>     5fd9399b31f173a931e6cfdb529988dd06 to /docker/
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     (00.000430) cg: rewriting docker/d830494e8bca353861c734a1285414
>     5fd9399b31f173a931e6cfdb529988dd06 to /docker/
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     (00.000433) cg: rewriting docker/d830494e8bca353861c734a1285414
>     5fd9399b31f173a931e6cfdb529988dd06 to /docker/
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     (00.000436) cg: rewriting docker/d830494e8bca353861c734a1285414
>     5fd9399b31f173a931e6cfdb529988dd06 to /docker/
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     (00.000438) cg: rewriting docker/d830494e8bca353861c734a1285414
>     5fd9399b31f173a931e6cfdb529988dd06 to /docker/
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     (00.000442) cg: rewriting docker/d830494e8bca353861c734a1285414
>     5fd9399b31f173a931e6cfdb529988dd06 to /docker/
>     50d41c5580e4800b17b753c1ca8ecb011c142842002e467eb79111c4324e737e
>     (00.000446) cg: Preparing cgroups yard (cgroups restore mode 0x4)
>     (00.000489) cg: Opening .criu.cgyard.g3irYd as cg yard
>     (00.000517) cg:  Making controller dir .criu.cgyard.g3irYd/cpu,cpuacct
>     (cpu,cpuacct)
>     (00.000555) Error (criu/cgroup.c:1642): cg:  Can't mount controller dir
>     .criu.cgyard.g3irYd/cpu,cpuacct: Device or resource busy
> 
> 
> 
> TIA,
> Krishna.

> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu



More information about the CRIU mailing list