Instance creation fails with libvirtError: Unable to create tap device: Device or resource busy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
High
|
yong sheng gong | ||
tacker |
Fix Released
|
Critical
|
yong sheng gong | ||
nova (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Summary:
This issue is observed frequently on Jenkins gate and has been reproducible in local setup too.
Steps:
Initiate 3 stack create requests at once in a script:
heat stack-create -f /home/stack/
heat stack-create -f /home/stack/
heat stack-create -f /home/stack/
using the following HOT file:
http://
One of the stack creations fails with CreateFailed: Resource Create Failed: Conflict: Resources. vdu3: Port Is Still In Use.
From the nova logs, there are duplicate bridges created for one of the servers. The qemu xml fails with libvirtError: Unable to create tap device tapd3a3d9e9-5d: Device or resource busy. See timestamp 2015-11-25 23:03:14.940 in n-cpu.log
Attaching the relevant n-cpu.log, q-svc.log and h-eng.log
Observation:
The 1st network interface for the nova instance is a Neutron Port resource provided in HOT template.
Nova sends a PUT request to update the port information. It also sends 2 POST requests for the 2nd and 3rd network interfaces.
Neutron receives the PUT request and sends network-event changed event while nova is still waiting for the POST response for the 2 ports.
If the network-changed event is received before the 3rd port POST response is received, refresh_cache is acquired by nova_service
Nova sends a query for port information, updates the cache and release the lock.
By then, POST requests are completed which acquires the cache lock again and sends request for network info. refresh_cache is updated twice and contains duplicate set of ports
Network vifs are built for all 6 ports and qemu xml is build based on that.
Duplicate bridges in xml is complained by libvirt as device or resource busy.
Version and environment:
Devstack Master
description: | updated |
tags: | added: gate-failure |
description: | updated |
Changed in nova: | |
assignee: | nobody → yong sheng gong (gongysh) |
Changed in tacker: | |
assignee: | nobody → yong sheng gong (gongysh) |
Changed in tacker: | |
importance: | Undecided → Critical |
Changed in nova: | |
importance: | Undecided → High |
tags: | added: network |
no longer affects: | heat (Ubuntu) |
no longer affects: | heat |
Changed in tacker: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/252824
Review: https:/