to this:
def get_vif_port_by_id(self, port_id): time.sleep(8)
args = ['--', '--columns=external_ids,name,ofport', 'find', 'Interface', 'external_ids:iface-id="%s"' % port_id]
result = self.run_vsctl(args)
On my system, the tap interface has a life of 5 to 6 seconds at current load levels (mostly idle). If the sleep is 10 seconds, it interferes with the DHCP request emitted from within the VM, so I split the difference and set it to 8 seconds. Obviously, this will vary by machine and load levels, so it is by no means adequate as a real fix. It just increases the success rate of getting the tag on the proper port in dom0 before DHCP sends its first request from within the VM. A side effect is that it takes that number of seconds longer before networking is functional again when restarting the OVS agent that controls dom0.
Workaround (not a real fix!): pyshared/ neutron/ agent/linux/ ovs_lib. py
On the node with the OVS agent controlling network in dom0 in /usr/share/
add to the top near the other import statements:
import time
Change this: port_by_ id(self, port_id): external_ ids,name, ofport' ,
'find' , 'Interface',
'external_ ids:iface- id="%s" ' % port_id] vsctl(args)
def get_vif_
args = ['--', '--columns=
result = self.run_
to this: port_by_ id(self, port_id):
time.sleep( 8) external_ ids,name, ofport' ,
'find' , 'Interface',
'external_ ids:iface- id="%s" ' % port_id] vsctl(args)
def get_vif_
args = ['--', '--columns=
result = self.run_
On my system, the tap interface has a life of 5 to 6 seconds at current load levels (mostly idle). If the sleep is 10 seconds, it interferes with the DHCP request emitted from within the VM, so I split the difference and set it to 8 seconds. Obviously, this will vary by machine and load levels, so it is by no means adequate as a real fix. It just increases the success rate of getting the tag on the proper port in dom0 before DHCP sends its first request from within the VM. A side effect is that it takes that number of seconds longer before networking is functional again when restarting the OVS agent that controls dom0.