[Lxc-users] freeze/suspend?

Greg Kurz gkurz at fr.ibm.com
Sat May 7 09:45:29 UTC 2011


On Sat, 2011-05-07 at 09:21 +0200, Ulli Horlacher wrote:
> I want to temporary suspend (no shutdown!) a running container (flupp)
> and start another with the same ip (for some tests).
> I thought freezing it is the best way, but:
> 
> 
> root at vms2:/lxc# lxc -l
> container              size (MB)   start-PID    status
> flupp                      33202        1978   running
> ubuntu                       490           0   stopped
> 
> root at vms2:/lxc# ping -c 1 flupp
> PING flupp.rus.uni-stuttgart.de (129.69.1.219) 56(84) bytes of data.
> 64 bytes from flupp.rus.uni-stuttgart.de (129.69.1.219): icmp_seq=1 ttl=64 time=0.028 ms
> 
> --- flupp.rus.uni-stuttgart.de ping statistics ---
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
> rtt min/avg/max/mdev = 0.028/0.028/0.028/0.000 ms
> 
> root at vms2:/lxc# lxc-freeze -n flupp
> 
> root at vms2:/lxc# lxc -l
> container              size (MB)   start-PID    status
> flupp                      33202        1978    frozen
> ubuntu                       490           0   stopped
> 
> root at vms2:/lxc# ping -c 1 flupp
> PING flupp.rus.uni-stuttgart.de (129.69.1.219) 56(84) bytes of data.
> 64 bytes from flupp.rus.uni-stuttgart.de (129.69.1.219): icmp_seq=1 ttl=64 time=0.038 ms
> 
> --- flupp.rus.uni-stuttgart.de ping statistics ---
> 1 packets transmitted, 1 received, 0% packet loss, time 0ms
> rtt min/avg/max/mdev = 0.038/0.038/0.038/0.000 ms
> 
> 
> The container flupp is still alive via network, so I cannot start the
> second container with the same ip.
> 

The lxc-freeze command relies on the freezer cg: it only affects tasks.

> 
> Other ideas for a suspend mode?
> 

AFAIK, there's nothing to implement a network freeze. A by the way, what
would be expected ? If you were to freeze a network stack for several
days, what should happen with TCP connections for example ? How
connected peers are supposed to behave ?
I guess the only sane solution for the moment would be to drop the ip
address before freezing the container, and try to require it at thaw
time.

Cheers.

-- 
Gregory Kurz                                     gkurz at fr.ibm.com
Software Engineer @ IBM/Meiosys                  http://www.ibm.com
Tel +33 (0)534 638 479                           Fax +33 (0)561 400 420

"Anarchy is about taking complete responsibility for yourself."
        Alan Moore.





More information about the lxc-users mailing list