<div dir="ltr"><div><div><div>Andrew, Ross, others<br><br></div> I took the hint of 'container init scripts' and added the apache startup scripts to the init (CMD in dockerfile) so that it starts the service instead of I having to docker exec it. By doing that, the checkpoint and restore worked as I wanted it.<br><br></div> So, this lead me experiment with a simple setup where I instantiate the source container and then later on exec the sample program (tcpdump in the background) as<br></div><div><br> docker exec -d test-xenial-apache tcpdump -i any -nn -s 0 -w /tmp/f.pcap<br><br></div><div>Now, I try to just checkpoint it. It does work, but I don't see this process being checkpointed. What I have on the host is<br><br>root 10908 10884 0 21:32 ? 00:00:00 bash start.sh<br>root 10978 10908 0 21:32 ? 00:00:00 /usr/sbin/apache2 -k start<br>root 11053 10908 0 21:32 ? 00:00:00 tail -f /dev/null<br>root 12499 12482 0 21:36 ? 00:00:00 tcpdump -i eth0 -nn -s 0 -w /tmp/f.pcap<br><br></div><div>And what I have in the container is:<br><br>root 1 0 0 01:32 ? 00:00:00 bash start.sh<br>root 29 1 0 01:32 ? 00:00:00 /usr/sbin/apache2 -k start<br>www-data 32 29 0 01:32 ? 00:00:00 /usr/sbin/apache2 -k start<br>www-data 33 29 0 01:32 ? 00:00:00 /usr/sbin/apache2 -k start<br>root 90 1 0 01:32 ? 00:00:00 tail -f /dev/null<br>root 91 0 0 01:36 ? 00:00:00 tcpdump -i eth0 -nn -s 0 -w /tmp<br><br></div><div>But the only 'dumping' in /var/lib/docker/containers/<CID>/checkpoints/<CHECKPT>/criu.work/dump.log are <br><br></div><div>(00.000097) Dumping processes (pid: 10908)<br>(00.011147) Dumping path for -3 fd via self 9 [/bin/bash]<br>(00.204961) Dumping path for -3 fd via self 9 [/usr/sbin/apache2]<br>(00.250838) Dumping path for -3 fd via self 12 [/usr/bin/tail]<br><br><br></div><div>So, why is tcpdump not getting dumped ? Is this by design ? Why is hostPID process 12499 (container PID 91) not being dumped ? I am using latest xemul/criu from <a href="http://github.com">github.com</a> (ver 2.4). <br><br></div><div>What information can I provide to help you give me some pointers ? <br>I can send you the entire dump.log, stats-dump and the dockerfile. From what I can see, docker is instantiating criu as with the following params<br></div><div><br> persist open tcp connections = true (default in docker)<br></div><div> persist unix sockets = true (default in docker)<br></div><div> exit the container after checkpoint complete = false (because I use --leave-running in docker checkpoint)<br></div><div> checkpoint shell jobs = false (default)<br></div><div> directory = /var/lib/containers/<CID>/checkpoints/<CHECKPT>/criu.work<br></div><div> create a namespace,.. = "network"<br><br></div><div>Could this be related to "checkpoint shell jobs" being set to false by docker ? <br><br></div><div>I could create a new topic for this specific query, if needed for clarity<br><br></div><div>Thanks<br></div><div> <br></div><div>vikram</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 12, 2016 at 11:19 PM, vikram kaul <span dir="ltr"><<a href="mailto:kaul.vikram.kaul@gmail.com" target="_blank">kaul.vikram.kaul@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I am trying to do a C/R on a docker container. In the past I have been working with lightweight containers derived from alpine. However, I now have to use Ubuntu xenial containers. I have created a stackoverflow question for this (link given), but I will provide a summary so that you can get some context <div><br></div><div><a href="http://stackoverflow.com/questions/38341520/docker-restore-from-checkpoint-cgroup-and-mountpoints-error" target="_blank">http://stackoverflow.com/questions/38341520/docker-restore-from-checkpoint-cgroup-and-mountpoints-error</a><br></div><div><br></div><div>So, I am getting </div><div><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;word-wrap:normal;color:rgb(36,39,41);background-color:rgb(239,240,241)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;white-space:inherit">mount.c:2555): mnt: Unable to statfs ./HOME: No such file or directory</code></pre></div><div>and</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:1em;padding:5px;border:0px;font-size:13px;width:auto;max-height:600px;overflow:auto;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;word-wrap:normal;color:rgb(36,39,41);background-color:rgb(239,240,241)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;white-space:inherit">Error (cgroup.c:1152): cg: No set 1 found</code></pre></div><div>errors when I try to create a docker container from a checkpoint of an currently running container. When creating the checkpoint, I keep the source container running. Note that if I checkpoint (and shutdown the source container) and then restore the same container, it works.</div><div><br></div><div>I upgraded to the latest criu/crit from source (ver 2.4) - seeing that there are a bunch of changes to cgroup handling - but that did not help.</div><div><br></div><div>I presume that since I don't have any trouble with alpine derived containers with restoring to new ones while the source is still running, it must be something related to Xenial derived containers. But I really don't know where to look. </div><div><br></div><div>Any help will be appreciated</div><div>Thanks</div></div>
</blockquote></div><br></div>