Re: [libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 02:46:43PM +0300, Oskari Saarenmaa wrote: > On Thu, Aug 29, 2013 at 11:28:43AM +0100, Daniel P. Berrange wrote: > > On Thu, Aug 29, 2013 at 01:00:15PM +0300, Oskari Saarenmaa wrote: > > > Replace the loop trying to find a free veth interface name for the > > > container > >

Re: [libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Oskari Saarenmaa
On Thu, Aug 29, 2013 at 11:28:43AM +0100, Daniel P. Berrange wrote: > On Thu, Aug 29, 2013 at 01:00:15PM +0300, Oskari Saarenmaa wrote: > > Replace the loop trying to find a free veth interface name for the container > > by assigning the container if name to parent name + 'p' by default. > > Interf

Re: [libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Daniel P. Berrange
On Thu, Aug 29, 2013 at 01:00:15PM +0300, Oskari Saarenmaa wrote: > Replace the loop trying to find a free veth interface name for the container > by assigning the container if name to parent name + 'p' by default. > Interface name selection logic is susceptible to race conditions, so try to > sele

[libvirt] [PATCHv2] virNetDevVethCreate: assign container if name based on parent if name

2013-08-29 Thread Oskari Saarenmaa
Replace the loop trying to find a free veth interface name for the container by assigning the container if name to parent name + 'p' by default. Interface name selection logic is susceptible to race conditions, so try to select just one name by default and use that as a template for the second name