user-cr: Extra unshare() calls ?

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Thu Mar 11 17:58:23 PST 2010


Sukadev Bhattiprolu [sukadev at linux.vnet.ibm.com] wrote:
| Serge E. Hallyn [serue at us.ibm.com] wrote:
| | Quoting Sukadev Bhattiprolu (sukadev at linux.vnet.ibm.com):
| | > 
| | > Came across this while testing LXC.
| | > 
| | > 
| | > 1. Does ckpt_remount_proc() need to unshare() ? Or can we have the
| | >    clone() that calls __ckpt_coordinator() clone with CLONE_NEWNS|CLONE_FS
| | >    instead ?
| | > 
| | >    The problem with the unshare() in ckpt_remount_proc() is that it
| | >    creates an extra level in cgroup hierarchy (see below) after restart.
| | >    So applications expecting the cgroup hierarchy before chckpoint will
| | >    be surprised.
| | > 
| | > 2. When --mount-pty (or --mntns) is specified, do we need to unshare() 
| | >    in the parent process ? Considering only the full-container restart
| | >    for now (ignore self-restart and subtree restart), can we just
| | >    specify (CLONE_NEWNS|CLONE_FS) at the time of creating the first
| | >    restarted process ?
| | 
| | And then move remounting of devpts into ckpt_remount_proc() called
| | from __ckpt_coordinator() as well?
| 
| Yes, I missed that in the hack.

Here is a more involved fix, but not sure if there is a more efficient
way to solve.

---


More information about the Containers mailing list