[Lxc-users] scripts to simplify application checkpoint/restart testing
Serge E. Hallyn
serge.hallyn at ubuntu.com
Thu Mar 17 15:00:10 UTC 2011
Let me first off admit that I have not gotten checkpoint/restart
to work with the ckpt-v23-rc1-pids tree. But hopefully this will
help make it easier to debug that.
Ideally (and eventually), the lxc toolsuite will be used for
checkpoint/restart. However, c/r is too unflexible and lxc too
flexible, so for now I've just coded some scripts to create little
containers. The start_job.sh script takes two arguments, a name for the
job, and the program to run. It creates a container with private netns,
running an ssh server and a running your job in a screen session. You
can checkpoint it with checkpoint.sh, and restart it with restart.sh.
kill_job.sh kills the job and cleans up the cgroup and other state.
You can get this from https://launchpad.net/~appcr/+archive/ppa,
or just put the attached scripts into /usr/bin. They assume
nsexec, appcheckpoint, and apprestart exist (yes, bc 'restart'
is hijacked by upstart :( ).
The next time I can spend some time on c/r, I'll be using these
scripts to try and figure out why kernel isn't treating me
right. I may go back to the rc1 (not '-pids') version.
-serge
PS - I did start on creating a 'lxc-cr'-like container template
to create checkpointable containers with lxc, but never quite got
that to work. Perfecting that seemed inappropriate when
sys_checkpoint isn't working anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: checkpoint.sh
Type: application/x-sh
Size: 701 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110317/3922056c/attachment.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jobinit.sh
Type: application/x-sh
Size: 1200 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110317/3922056c/attachment-0001.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kill_job.sh
Type: application/x-sh
Size: 268 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110317/3922056c/attachment-0002.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: restart_real.sh
Type: application/x-sh
Size: 999 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110317/3922056c/attachment-0003.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: restart.sh
Type: application/x-sh
Size: 285 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110317/3922056c/attachment-0004.sh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: start_job.sh
Type: application/x-sh
Size: 1712 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20110317/3922056c/attachment-0005.sh>
More information about the lxc-users
mailing list