[CRIU] checkpoint xpra docker container
Adrian Reber
adrian at lisas.de
Mon Jun 15 15:55:52 MSK 2020
On Mon, Jun 08, 2020 at 04:01:43PM +0200, Matthieu Imbert wrote:
> I'm trying to checkpoint a docker container running an xpra
> (https://xpra.org/) 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.
>
> 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.
>
> 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 cannot get xpra to start in a way to try to connect to it, but I saw
in the log file (in your case: /run/user/0/xpra/Xorg.S6.log) that the X
server was actually using the video hardware. You need to make sure it
does not use the local hardware.
I also saw that xpra says it is using systemd-run. Not sure what that
means in a container. If a crashed application will automatically be
restarted?
Adrian
More information about the CRIU
mailing list