[lxc-devel] question about /sys/fs/cgroup/cgmanager

Dietmar Maurer dietmar at proxmox.com
Sat Nov 7 17:13:06 UTC 2015



> On November 7, 2015 at 5:17 PM Stéphane Graber <stgraber at ubuntu.com> wrote:
> 
> 
> On Sat, Nov 07, 2015 at 01:14:07PM +0100, Dietmar Maurer wrote:
> > > The reason we did it this way instead of just binding in the sock itself
> > > is
> > > because if cgmanager restarts, this allows all containers to continue and
> > > just pick up the new socket. 
> > 
> > But an AF_UNIX socket is just an inode inside the file system? So there is
> > no
> > need to delete the socket when we restart cgmanager. Instead, cgmanager can
> > simply use the existing socket? 
> 
> No, you cannot bind to an existing socket, even if nothing's bound to it
> right now.
> 
> You must delete the socket and let bind() create it again for you.

Ah, yes. I slowly remember that I always write unlink before bind ;-)

I found some information about socket reuse here:

http://stackoverflow.com/questions/15716302/so-reuseaddr-and-af-unix

But it there a technical reason for this behavior, or is it simply
not implemented (I am just curios)?



More information about the lxc-devel mailing list