With hw:vif_multiqueue_enabled, libvirt driver fails with VM larger than 8 vCPU
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| OpenStack Compute (nova) |
Low
|
Unassigned | ||
| nova (Ubuntu) |
Low
|
Unassigned |
Bug Description
Nova version: 2:12.0.
Release: Liberty
Compute node kernel: 3.19.0-47-generic
Hypervisor: Libvirt+KVM
libvirtd version: 1.2.16
Neutron network (Linuxbridge Agent)
When attempting to instantiate an VM based on an image with the metadata hw:vif_
From /var/log/
2016-04-14 21:19:08.161+0000: 3651: error : virNetDevTapCre
This is the error throw when attempting to create the VM.
I believe the reason is that in kernels prior to 4.0, the number of queues on a tap interface was limited to 8.
Based on http://
In the libvirt vif driver (nova/virt/
Sylvain Bauza (sylvain-bauza) wrote : | #1 |
tags: | added: libvirt low-hanging-fruit |
Changed in nova: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Kengo Sakai (kengo-sakai) |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
Kengo Sakai (kengo-sakai) wrote : | #2 |
Is there anyone who knows how to retrieve MAX_TAP_QUEUES from the running system? I looked at drivers/net/tun.c but couldn't find how to do it.
MAX_TAP_QUEUES is 8 in kernel 3.x[1] and it is 256 in kernel 4.x[2]. I want to find MAX_TAP_QUEUES programmatically without hardcoding its value for each kernel version.
[1]https:/
[2]https:/
Fix proposed to branch: master
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Jenkins
Branch: master
commit b9303e67640ac20
Author: Kengo Sakai <email address hidden>
Date: Wed Jun 22 16:04:06 2016 +0900
Check if flavor.vcpus is more than MAX_TAP_QUEUES
When attempting to instantiate an instance based on an image with
the metadata hw:vif_
flavor.vcpus as the number of queues on a tap interface.
In kernels prior to 3.0, multiple queues on a tap interface
is not supported[1]. In kernels 3.x, the number of queues
on a tap interface is limited to 8 as MAX_TAP_QUEUES in tun
driver[2]. From 4.0, the number is 256[3]. If flavor.vcpus
is more than MAX_TAP_QUEUES, creating the tap interface
fails.
This commit adds logic to check if flavor.vcpus is more
than MAX_TAP_QUEUES and use MAX_TAP_QUEUES as the number
of queues if so.
[1]https:/
[2]https:/
[3]https:/
Change-Id: I2aa24e3cf550ff
Closes-Bug: #1570631
Changed in nova: | |
status: | In Progress → Fix Released |
This issue was fixed in the openstack/nova 14.0.0.0b2 development milestone.
Changed in nova (Ubuntu): | |
status: | Triaged → Fix Released |
Saverio Proto (zioproto) wrote : | #6 |
The patch does not solve the problem for me.
nova has to check the qemu version in addition to the kernel version and set its limit accordingly
In the version I am using of qemu (Ubuntu Liberty UCA) I have:
VIRTIO_
This leads to 31 max queues: (VIRTIO_
It is not just the Kernel version
Please read also bug #1644839
Changed in nova: | |
assignee: | Kengo Sakai (kengo-sakai) → nobody |
Related fix proposed to branch: master
Review: https:/
The bug is also present in master.