<div dir="ltr">Hello.<div><br></div><div>The idea of Pavel to reuse part of &quot;<span style="font-size:12.8px">restore: restore freezer cgroup state</span>&quot; patch looks good and simple.</div><div><br></div><div>About networking unlock. Yes. There is a work in progress on new criu gc command.</div><div>You can find patch commit here: <a href="https://github.com/AuthenticEshkinKot/criu/commit/2ab52fec7a05f9792c871709758d14137fe9f379">https://github.com/AuthenticEshkinKot/criu/commit/2ab52fec7a05f9792c871709758d14137fe9f379</a></div><div><br></div><div>The main problem with it is the fact that network unlock and link remaps cleanup logic</div><div>is coupled with logic of criu restore command. And criu restore logic is not trivial.</div><div>So we&#39;re trying to carefully reduce the amount of code in CRIU gc. We need to reuse CRIU restore command code and need not to introduce ugly hacks and excessive CRIU restore code dependencies (this dependence would limit CRIU restore code changes at the same time).</div><div><br></div><div>GRIU gc both able print what&#39;s left in the system after dump (iptables, link remaps) and to cleanup this stuff too.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-16 15:31 GMT+03:00 Pavel Emelyanov <span dir="ltr">&lt;<a href="mailto:xemul@virtuozzo.com" target="_blank">xemul@virtuozzo.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 05/10/2016 08:04 PM, Tycho Andersen wrote:<br>
&gt; Hi guys,<br>
&gt;<br>
&gt; I&#39;m looking at implementing some kind of --leave-frozen option in<br>
&gt; CRIU, so that we can have a basic UX in LXD where we can wait for the<br>
&gt; restore to be successful before we kill the checkpointed container. I<br>
&gt; know p.haul does this by just using a callback, but it would be sort<br>
&gt; of painful to absorb just the callback part without doing a lot of<br>
&gt; extra engineering. We&#39;ll get LXD using p.haul someday, though :)<br>
&gt;<br>
&gt; The actual --leave-frozen patch is not so bad (see attached), but I&#39;m<br>
&gt; not sure what to do about the network locking/unlocking bits.<br>
<br>
There was a patch 8b04551c (restore: restore freezer cgroup state) in 2.0<br>
that turned cgroup into whatever state it was before dump. Can it be fixed<br>
to make &#39;--leave-frozen&#39; alter the behavior of add_freezer_state_for_restore()<br>
and set it to &#39;frozen&#39; always?<br>
<br>
&gt; It seems like it is always safe to do the bits in<br>
&gt; cpt_unlock_tcp_connections() since that&#39;s just disabling tcp repair<br>
&gt; mode, but all of the iptables rules seem necessary in order to keep<br>
&gt; the network locked.<br>
&gt;<br>
&gt; So my question is: is there a nice way we can &quot;tag&quot; these rules so<br>
&gt; that something can come by and delete them later? I was thinking about<br>
&gt; having criu add a comment (via -m comment --comment &quot;CRIU-LOCK-RULE&quot;)<br>
&gt; to each rule it adds, but I&#39;m not sure if there&#39;s a better way, or if<br>
&gt; I&#39;ve missed something entirely.<br>
<br>
Yes, there&#39;s an issue #45 -- show what&#39;s left in the system after dump. Iptables<br>
rules are in the list :) I know that some gentlemen (Cc) from Saint-Petersburg were<br>
interested in implementing it in form of &#39;criu gc&#39; action, so probably tuning this<br>
option to support &#39;--show-only&#39; would help you?<br>
<br>
&gt; Thanks!<br>
&gt;<br>
&gt; Tycho<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; CRIU mailing list<br>
&gt; <a href="mailto:CRIU@openvz.org">CRIU@openvz.org</a><br>
&gt; <a href="https://lists.openvz.org/mailman/listinfo/criu" rel="noreferrer" target="_blank">https://lists.openvz.org/mailman/listinfo/criu</a><br>
&gt;<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Best regards,<br>Eugene Batalov.</div>
</div>