[Devel] Re: [PATCH 0/6][lxc][v3] Link LXC with USERCR

Michel Normand normand at fr.ibm.com
Wed Mar 31 02:29:33 PDT 2010


Hi Suka, 
I tried to follow your how-to but failed to checkpoint 
your first example.

Le mercredi 31 mars 2010 à 00:04 -0700, Sukadev Bhattiprolu a écrit :
> lxc-checkpoint, lxc-restart in the LXC source tree are currently stubs.
> Following set of patches, when applied to LXC and built with USERCR as
> described below, enable enable lxc-checkpoint and lxc-restart of some
> simple containers

> [CUT] ...

> 1. Build USERCR
> 
> 	$ cd /root
> 
> 	$ git-clone git://git.ncl.cs.columbia.edu/pub/git/user-cr.git user-cr
> 
> 	$ cd user-cr
> 
> 	$ git-checkout ckpt-v20-dev
> 
> 	  	Tested with commit e275f77e4a82d228c1df14dbeb691342e32cdac2
> 		as HEAD.
> 	
> 	# Apply following two patches:
> 
> 	https://lists.linux-foundation.org/pipermail/containers/2010-March/024037.html
> 	https://lists.linux-foundation.org/pipermail/containers/2010-March/024038.html
> 
> 	$ cd /root/user-cr
> 
> 	$ KERNELSRC=/root/linux-2.6/ make 
> 
> 		Build USERCR by pointing to corresponding kernel-source.
> 		This should create restart.o and checkpoint.o needed by LXC.

I assume we need a sudo make install, at least for ckptinfo, do we ?

> 2. Build/install LXC
> 
> 	$ cd /root/lxc.git
> 
> 	Apply attached patches to LXC (I tested with these patches applied
> 	to commit 9ea8066aa67b808f71f46e346bd7a215e2a355f3)
> 
> 	$ autogen.sh
> 
> 	$ ./configure --with-libcr=/root/user-cr
> 
> 		This will fail if /root/user-cr does not container checkpoint.o,
> 		restart.o and app-checkpoint.h files 
> 	$ make
> 
> 	$ make install
> 
> 3. Checkpoint/restart a simple LXC container
> 
> 	$ lxc-execute --name foo --rcfile lxc-no-netns.conf -- /bin/sleep 1000
> 
> 	$ lxc-checkpoint --name foo --image /root/lxc-foo.ckpt

not --image but --statefile

* The command failed, but no details of the error.
Would it be possible to have displayed on stderr an error message
to explain the cause of the problem ?
===
$lxc-checkpoint -n foo --statefile sf
lxc-checkpoint: checkpoint of foo (pid 1554) failed

lxc-checkpoint: failed to checkpoint 'foo'
===

* If I am re-running the command adding -ofoo.log -lTRACE
I have one more clue with following two lines, but do not help.
could the message be improved ?
===
checkpoint: Invalid argument
(you may use 'ckptinfo -e' for more info)
===

* and doing a strace of the command. How to determine what is wrong ?
===
open("sf", O_RDWR|O_CREAT|O_EXCL, 0600) = 4
SYS_339(0x628, 0x4, 0x3, 0xffffffff, 0x1) = -1 EINVAL (Invalid argument)
===

---
Michel

> 
> 	$ lxc-stop --name foo
> 
> 	$ lxc-restart --name foo --image /root/lxc-foo.ckpt

> [CUT] ...

_______________________________________________
Containers mailing list
Containers at lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers




More information about the Devel mailing list