C/R minisummit notes (namespace naming)
Serge E. Hallyn
serue at us.ibm.com
Fri Jul 25 12:13:56 PDT 2008
Quoting Eric W. Biederman (ebiederm at xmission.com):
> Currently we have three possibilities on how to name pid namespaces.
> - indirect via processes
> - pids
> - names in the filesystem
> We discussed this a bit in the hallway track and pids are look like the way
> to go. Pavel has a patch in progress to help sort this out.
> The practical problem we have today is that we need a way to wait for the network
> namespace in particular and namespaces in general to exit.
> At a first glance waitid(P_NS, <pid>,....) looks like a useful way to achieve
> this. After looking at wait a bit more it really is fundamentally just an exit
> status reaper of zombies, that has the option of blocking when the zombies
> do not yet exist. In any kind of event loop you would wait for SIGCHLD either
> as a signal or with signalfd.
> So how shall we wait for a namespace to exit? My brainstorm tonight suggests
> inotify_add_watch(ifd, "/proc/ns/<pid>", IN_DELETE);
I'm sorry, I'm still not quite clear on...
You care about when the tasks exit, and you care about when network
devices, for instance, need to be deleted (which you can presumably
get uevents for, when they get moved back into init_net_ns).
Why do you care when the struct net actually gets deleted?
More information about the Containers