[Devel] [RFC rh7] net: venet -- Cleanup ip address on ve exit

Cyrill Gorcunov gorcunov at odin.com
Fri May 22 08:44:18 PDT 2015


On Fri, May 22, 2015 at 06:38:06PM +0300, Andrey Vagin wrote:
> On Wed, May 20, 2015 at 08:21:59PM +0300, Cyrill Gorcunov wrote:
> > While been playing with c/r of a container with IP assigned I found that
> > VE exit (ve_drop_context) is happening earlier than venet::exit
> > routine which means the ve::ve_netns = nil when we enter into
> > ip releasing procedure.
> > 
> >  | zap_pid_ns_processes
> >  |  ve_stop_ns
> >  |  ve_exit_ns
> >  |   ve_drop_context(ve);
> >  |    put_net(ve->ve_netns);
> >  |    ve->ve_netns = NULL;
> > 
> > Releasing ve context that early looks logical because ve::ve_netns
> > is a part of ve structure itself, in turn ip address and venet device
> > is rather a side feature provided by venet module.
> > 
> > So because we do not create nested venet devices and adding
> > some additional ioctl makes code only harder to read I propose
> > to use VE exit hook to cleanup ip address.
> > 
> > With the patch applied I can checkpoint/restore container
> > with venet configured.
> 
> Is it posibale to unload the venet module? Is it ok with this patch?

If venet module start using IP then no, until IP is release module will
keep a reference via get-module (ie until VE get stopped). If only I'm
not missing something obvious.



More information about the Devel mailing list