On Mon, May 08, 2017 at 03:03:30PM +0800, ZhiPeng Lu wrote:
＞＞ In qemuProcessStop we explicitly remove the port from the openvswitch bridge after
＞＞ qemuProcessKill is called. But there is a certain interval of time between
＞＞ deleting tap device and removing it from bridge. The problem occurs when two vms
＞＞ start and shutdown with the same name's network interface attached to the same
＞＞ openvswitch bridge. When one vm with the nic named "vnet0" stopping, it deleted
＞＞tap device without timely removing the port from bridge.
＞＞.At this time, another vm created the tap device named "vnet0" and added port to the
＞＞ same bridge. Then, the first vm removed the port from the same bridge.
＞＞ Finally, the tap device of the second vm did not attached to the bridge.
＞＞ We need to delete the bridge port before deleting the tap device instead of after.
＞＞ So what's needed is to move the loop in qemuProcessStop that cleans up
＞＞ network interfaces so that it happens before qemuProcessKill is called.
＞This fix won't work correctly either. You cannot assume that libvirt has
＞control over when the QEMU process exits. It may exit itself *before*
＞libvirt runs any of its cleanup code.
On Mon, May 08, 2017 at 06:18:25PM +0800, lu zhipeng zte com cn wrote:
＞ I may not have described it clearly.
＞ i need to ensure the order of adding port to bridge and deleting from bridge.
＞ i rename tap device to avoid the problem in my first patch.i think it can solve the problem.
＞ my second patch may can't resolve the problem .
＞ Do you have any better ideas?
IT开发工程师 IT Development
操作系统产品部/中心研究院/系统产品 OS Product Dept./Central R＆D Institute/System Product
33/F, R&D Building, ZTE Corporation Hi-tech Road South,
Hi-tech Industrial Park Nanshan District, Shenzhen, P.R.China, 518057
T: +86 755 xxxxxxxx F:+86 755 xxxxxxxx
M: +86 xxxxxxxxxxx
E: lu zhipeng zte com cn