[winswitch] checkpoint xpra docker container

Antoine Martin antoine at nagafix.co.uk
Tue Jun 9 06:42:23 BST 2020


On 08/06/2020 21:13, Matthieu Imbert via shifter-users wrote:
> Hi,
> 
> I'm trying to checkpoint a docker container running an xpra server,
> which runs an x11 app (i'm currently testing with xcalc).
> 
> My goal is to be able to checkpoint (and stop) the container, then
> restart it later, and connect (through xpra) to the x11 app in the same
> state as it was at the time of the checkpoint.
OTOH, this should work.

> Under the hood, docker uses criu (https://criu.org/Main_Page) to do the
> checkpointing. I understand that doing that directly with the x11 app is
> not possible because there is part of the state which is inside the x11
> server, thus not accessible to criu, this is why I think that embedding
> everything in a docker container with xpra might be the solution,
> because everything is inside the container, so we may reasonably expect
> that all relevant state will be saved with a docker checkpoint.
> 
> For now, i'm able to checkpoint the container without error, and restart
> the container from the checkpoint, but when the container is restarted,
> xpra restarts from scratch (at least, this is what it looks like, when
> looking at the container logs) and the x11 app is restarted as well, and
> thus looses its state.
There is nothing in xpra that auto-restarts a server, so you must have
configured your checkpoint system to do that.

FYI: both your client and server versions are out of date.

> Do you have an idea of what goes wrong here, and is there a way to fix it?
> 
> Here are the details of my test: everything is here:
> https://github.com/mimbert/docker-xpra-criu-test with instructions on
> how to reproduce.
> 
> An execution log is here:
> https://github.com/mimbert/docker-xpra-criu-test/blob/master/execution.log
> line 66 is the moment I do the checkpoint
> line 68 is the moment I restart the container
> 
> (I also posted to the criu community)
That's the best place to ask, as this does not look like a problem with
xpra.

Cheers,
Antoine


> 
> Cheers,
> 




More information about the shifter-users mailing list