<div dir="ltr">For the easy case of comparing pathname strings on the command line (-D and --root), I think it's better to error and exit instead of restoring with all the cgyard mounts leaked into the restored process tree.<div><br></div><div>For a more general solution, is it possible to make sure that after fini_cgroup() the cgyard mount points have been successfully removed from the restored tree?<br></div><div><br></div><div>--Saied</div><div><br></div><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 7:13 AM, Tycho Andersen <span dir="ltr"><<a href="mailto:tycho.andersen@canonical.com" target="_blank">tycho.andersen@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Mar 24, 2015 at 11:26:31AM +0300, Pavel Emelyanov wrote:<br>
> On 03/19/2015 05:50 PM, Tycho Andersen wrote:<br>
> > We need to finalize the cg yard both on successful cgroup restore and on a<br>
> > failed restore. Further, we should restore the cgroup properties before<br>
> > allowing the task to continue in all modes (previously properties were only<br>
> > restored correctly in --restore-detached mode).<br>
> ><br>
> > CC: Saied Kazemi <<a href="mailto:saied@google.com">saied@google.com</a>><br>
> > Signed-off-by: Tycho Andersen <<a href="mailto:tycho.andersen@canonical.com">tycho.andersen@canonical.com</a>><br>
><br>
> Although we still have issue with --images-dir being subdir of --root it<br>
> seems to be unrelated to this particular patch.<br>
><br>
> So I apply this one, thanks Tycho.<br>
<br>
</div></div>Thanks. I think the sanity check Saied suggested is a good one<br>
(although perhaps it should be a warning instead of an error?); I can<br>
send a patch for that if we decide what the output should be.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tycho<br>
</font></span></blockquote></div><br></div>