Re: [libvirt] [PATCHv3] lxc veth interfaces: fix interface name collisions

2013-10-02 Thread Oskari Saarenmaa
On 02/10/13 14:30, Daniel P. Berrange wrote: On Wed, Oct 02, 2013 at 11:45:27AM +0300, Oskari Saarenmaa wrote: This does change the interface names from nice low integers to random larger integers, but I don't see that an issue. And the caller can select any other name they like if that's not a

Re: [libvirt] [PATCHv3] lxc veth interfaces: fix interface name collisions

2013-10-02 Thread Daniel P. Berrange
On Wed, Oct 02, 2013 at 11:45:27AM +0300, Oskari Saarenmaa wrote: > The previous veth interface naming scheme tried to find the lowest unused > index for both the parent and container veth interfaces. That's susceptible > to race conditions when multiple containers are started at the same time. >

[libvirt] [PATCHv3] lxc veth interfaces: fix interface name collisions

2013-10-02 Thread Oskari Saarenmaa
The previous veth interface naming scheme tried to find the lowest unused index for both the parent and container veth interfaces. That's susceptible to race conditions when multiple containers are started at the same time. Try to pick a random unused interface id for the parent if one wasn't giv