Closed washraf closed 8 years ago
@washarf. Is CRIU un the PATH with the same user you're running cmt?
I don't get what you mean and I only ran the make and install commands ?
@washraf CMT needs CRIU
and runc
in other to work. Instructions are in the README file.
So, in order for CMT to work you need to make sure that both CRIU and runC are available in the PATH of the user that executes CMT.
yes both are .. walid@ubuntu:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/local/go/src/bin walid@ubuntu:~$ which criu /usr/local/sbin/criu walid@ubuntu:~$ which runc /usr/local/bin/runc
@washraf what do you get if you do ssh walid@192.168.1.12 bash -c "which criu"
It doesn't give a response neither an error not with the criu command but also with some basic ones like "ls"
@washraf please try
ssh walid@192.168.1.12 "bash -c 'which criu'"
(note quoting)
walid@ubuntu:~$ ssh walid@192.168.1.12 "bash -c 'which criu'" /usr/local/sbin/criu
@washraf the machine where you're running CMT has the identity key in the ssh-agent right?. Basically, can you connect to the destination host without typing the password?
yes, I have configured it already before i started testing
@washraf just realized something, try this please:
ssh walid@192.168.1.12 "bash -c 'sudo which criu'"
Both runC and criu need to be in the PATH using sudo
from the user you're using.
btw, you forget the -t option, it worked and it sure asked for the root password.
walid@ubuntu:~$ ssh -t walid@192.168.1.12 "bash -c 'sudo which criu'"
[sudo] password for walid:
/usr/local/sbin/criu
Connection to 192.168.1.12 closed.
@washraf that's the problem you need to configure SUDO so the walid user can execute runC and CRIU without entering the password.
validation succeeded ... thanks very much :+1: :smile: I will close the issue ..
when i cd in the real container folder (I am using ubuntu container) when i try to migrate it i get an error.
walid@ubuntu:~$ cmt validate --src `pwd` --dst walid@192.168.1.12
Validation succeded
walid@ubuntu:~$ cd goapp/
walid@ubuntu:~/goapp$ cmt validate --src `pwd` --dst walid@192.168.1.12
2016/01/12 14:49:51 Error dumping CPU info
walid@ubuntu:~/goapp$ cmt migrate --src `pwd` --dst walid@192.168.1.12:/home/walid/goapp
2016/01/12 14:49:59 Performing validations
2016/01/12 14:49:59 Error dumping CPU info
@washraf try criu cpuinfo dump
in the src machine.
walid@ubuntu:~/goapp$ sudo criu cpuinfo dump
walid@ubuntu:~/goapp$ ls
checkpoint config.json cpuinfo.img rootfs runtime.json ubuntu_latest.tar
Try without sudo plz
sent from mobile On Jan 13, 2016 12:59 PM, "washraf" notifications@github.com wrote:
walid@ubuntu:~/goapp$ sudo criu cpuinfo dump walid@ubuntu:~/goapp$ ls checkpoint config.json cpuinfo.img rootfs runtime.json ubuntu_latest.tar
— Reply to this email directly or view it on GitHub https://github.com/marcosnils/cmt/issues/12#issuecomment-171341917.
walid@ubuntu:~/goapp$ criu cpuinfo dump
Error (image.c:319): Unable to open cpuinfo.img: Permission denied
That's the issue
sent from mobile On Jan 13, 2016 1:11 PM, "washraf" notifications@github.com wrote:
walid@ubuntu:~/goapp$ criu cpuinfo dump Error (image.c:319): Unable to open cpuinfo.img: Permission denied
— Reply to this email directly or view it on GitHub https://github.com/marcosnils/cmt/issues/12#issuecomment-171345418.
walid@ubuntu:~/test-criu$ cmt migrate --src pwd
--dst walid@192.168.1.12:/home/walid/test-criu
2016/01/13 22:34:00 Performing validations
2016/01/13 22:34:01 Preparing everything to do a checkpoint
2016/01/13 22:34:01 Performing the checkpoint predump = false
2016/01/13 22:34:02 Error performing checkpoint:exit status 1
walid@ubuntu:~/test-criu$ criu cpuinfo dump
walid@ubuntu:~/test-criu$ ls
config.json cpuinfo.img images rootfs runtime.json ubuntu_latest.tar
@marcosnils any feed back on this after updates ??
hey @washraf can you check please the dump logs to see what's the error when trying to checkpoint. There should be somewhere in /var/run/opencontainer/runc/.....
there are no log files ... only state files .. But when I run:
sudo runc checkpoint
criu failed: type DUMP errno 0
log file: /run/opencontainer/containers/test-criu/criu.work/dump.log
and here is the error description. (00.001246) Error (proc_parse.c:827): SECCOMP_MODE_FILTER not currently supported (00.001249) Error (proc_parse.c:840): Error parsing proc status file (00.001296) Unfreezing tasks into 1 (00.001300) Unseizing 5729 into 1 (00.001307) Error (ptrace.c:43): Unable to detach from 5729: No such process (00.001312) Unlock network (00.001314) Unfreezing tasks into 1 (00.001315) Unseizing 5729 into 1 (00.001316) Error (ptrace.c:43): Unable to detach from 5729: No such process (00.001343) Error (cr-dump.c:1617): Dumping FAILED.
and P.s. Runc only runs as a sudo ??
@washraf got it to work?
no I implemented my own migration automation over runc and NFS file system
Put I have a quick question runc takes the terminal and I want to run it in a go program to be able to measure its performance. Even though I am using the -d option it still take the terminal
command := exec.Command("runc","start","-d","redis","& >/dev/null </dev/null")
command.Dir = "/containers/redis"
start := time.Now()
command.CombinedOutput()
duration:= time.Since(start)/time.Millisecond
fmt.Println(duration)
its the same for the restore command
Error in validation: cmt validate --src
pwd
--dst walid@192.168.1.12 2016/01/11 17:31:53 Error criu does not exist in dstI am sure that the destination is the same and i tried it the other way too.