[Openstack] Problem with PCI passthrough in havana
Sławek Kapłoński
slawek at kaplonski.pl
Thu Jan 9 10:16:29 UTC 2014
Hello,
I was just try to assign Virtual Function (VF) of my network card to
openstack VM. I tries it on devstack installation. After I prepare all
according to https://wiki.openstack.org/wiki/Pci_passthrough I have got
error:
DEBUG nova.compute.resource_tracker [-] Hypervisor: assignable PCI
devices: [{"dev_id": "pci_0000_02_10_0", "product_id": "10ed",
"phys_function": [["0x0000", "0x02", "0x00", "0x0"]], "address":
"0000:02:10.0", "dev_type": "type-VF", "vendor_id": "8086", "label":
"label_8086_10ed"}, {"dev_id": "pci_0000_02_10_1", "product_id": "10ed",
"phys_function": [["0x0000", "0x02", "0x00", "0x1"]], "address":
"0000:02:10.1", "dev_type": "type-VF", "vendor_id": "8086", "label":
"label_8086_10ed"}, {"dev_id": "pci_0000_02_10_2", "product_id": "10ed",
"phys_function": [["0x0000", "0x02", "0x00", "0x0"]], "address":
"0000:02:10.2", "dev_type": "type-VF", "vendor_id": "8086", "label":
"label_8086_10ed"}, {"dev_id": "pci_0000_02_10_3", "product_id": "10ed",
"phys_function": [["0x0000", "0x02", "0x00", "0x1"]], "address":
"0000:02:10.3", "dev_type": "type-VF", "vendor_id": "8086", "label":
"label_8086_10ed"}, {"dev_id": "pci_0000_02_10_4", "product_id": "10ed",
"phys_function": [["0x0000", "0x02", "0x00", "0x0"]], "address":
"0000:02:10.4", "dev_type": "type-VF", "vendor_id": "8086", "label":
"label_8086_10ed"}, {"dev_id": "pci_0000_02_10_5", "product_id": "10ed",
"phys_function": [["0x0000", "0x02", "0x00", "0x1"]], "address":
"0000:02:10.5", "dev_type": "type-VF", "vendor_id": "8086", "label":
"label_8086_10ed"}, {"dev_id": "pci_0000_08_01_0", "product_id": "0532",
"address": "0000:08:01.0", "dev_type": "type-PCI", "vendor_id": "102b",
"label": "label_102b_0532"}] from (pid=22603)
_report_hypervisor_resource_view
/opt/stack/nova/nova/compute/resource_tracker.py:429
2014-01-09 11:13:11.969 ERROR object [-] Error setting
PciDevice.extra_info
2014-01-09 11:13:11.969 TRACE object Traceback (most recent call last):
2014-01-09 11:13:11.969 TRACE object File
"/opt/stack/nova/nova/objects/base.py", line 70, in setter
2014-01-09 11:13:11.969 TRACE object field.coerce(self, name,
value))
2014-01-09 11:13:11.969 TRACE object File
"/opt/stack/nova/nova/objects/fields.py", line 166, in coerce
2014-01-09 11:13:11.969 TRACE object return self._type.coerce(obj,
attr, value)
2014-01-09 11:13:11.969 TRACE object File
"/opt/stack/nova/nova/objects/fields.py", line 332, in coerce
2014-01-09 11:13:11.969 TRACE object obj, '%s["%s"]' % (attr, key),
element)
2014-01-09 11:13:11.969 TRACE object File
"/opt/stack/nova/nova/objects/fields.py", line 166, in coerce
2014-01-09 11:13:11.969 TRACE object return self._type.coerce(obj,
attr, value)
2014-01-09 11:13:11.969 TRACE object File
"/opt/stack/nova/nova/objects/fields.py", line 218, in coerce
2014-01-09 11:13:11.969 TRACE object value.__class__.__name__)
2014-01-09 11:13:11.969 TRACE object ValueError: A string is required
here, not list
2014-01-09 11:13:11.969 TRACE object
2014-01-09 11:13:11.971 DEBUG nova.openstack.common.lockutils [-]
Semaphore / lock released "update_available_resource" from (pid=22603)
inner /opt/stack/nova/nova/openstack/common/lockutils.py:252
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py",
line 346, in fire_timers
timer()
File "/usr/local/lib/python2.7/dist-packages/eventlet/hubs/timer.py",
line 56, in __call__
cb(*args, **kw)
File "/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line
163, in _do_send
waiter.switch(result)
File "/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py",
line 194, in main
result = function(*args, **kwargs)
File "/opt/stack/nova/nova/openstack/common/service.py", line 480, in
run_service
service.start()
File "/opt/stack/nova/nova/service.py", line 182, in start
self.manager.pre_start_hook()
File "/opt/stack/nova/nova/compute/manager.py", line 814, in
pre_start_hook
self.update_available_resource(nova.context.get_admin_context())
File "/opt/stack/nova/nova/compute/manager.py", line 4967, in
update_available_resource
rt.update_available_resource(context)
File "/opt/stack/nova/nova/openstack/common/lockutils.py", line 249,
in inner
return f(*args, **kwargs)
File "/opt/stack/nova/nova/compute/resource_tracker.py", line 318, in
update_available_resource
'pci_passthrough_devices')))
File "/opt/stack/nova/nova/pci/pci_manager.py", line 193, in
set_hvdevs
dev_obj = pci_device.PciDevice.create(dev)
File "/opt/stack/nova/nova/objects/pci_device.py", line 174, in create
pci_device.update_device(dev_dict)
File "/opt/stack/nova/nova/objects/pci_device.py", line 136, in
update_device
self.extra_info = extra_info
File "/opt/stack/nova/nova/objects/base.py", line 70, in setter
field.coerce(self, name, value))
File "/opt/stack/nova/nova/objects/fields.py", line 166, in coerce
return self._type.coerce(obj, attr, value)
File "/opt/stack/nova/nova/objects/fields.py", line 332, in coerce
obj, '%s["%s"]' % (attr, key), element)
File "/opt/stack/nova/nova/objects/fields.py", line 166, in coerce
return self._type.coerce(obj, attr, value)
File "/opt/stack/nova/nova/objects/fields.py", line 218, in coerce
value.__class__.__name__)
ValueError: A string is required here, not list
2014-01-09 11:13:11.973 ERROR nova.openstack.common.threadgroup [-] A
string is required here, not list
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
Traceback (most recent call last):
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/openstack/common/threadgroup.py", line 117, in
wait
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
x.wait()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/openstack/common/threadgroup.py", line 49, in wait
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return self.thread.wait()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line
168, in wait
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return self._exit_event.wait()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/usr/local/lib/python2.7/dist-packages/eventlet/event.py", line 116, in
wait
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return hubs.get_hub().switch()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/usr/local/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 187,
in switch
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return self.greenlet.switch()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/usr/local/lib/python2.7/dist-packages/eventlet/greenthread.py", line
194, in main
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
result = function(*args, **kwargs)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/openstack/common/service.py", line 480, in
run_service
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
service.start()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/service.py", line 182, in start
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
self.manager.pre_start_hook()
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/compute/manager.py", line 814, in pre_start_hook
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
self.update_available_resource(nova.context.get_admin_context())
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/compute/manager.py", line 4967, in
update_available_resource
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
rt.update_available_resource(context)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/openstack/common/lockutils.py", line 249, in inner
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return f(*args, **kwargs)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/compute/resource_tracker.py", line 318, in
update_available_resource
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
'pci_passthrough_devices')))
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/pci/pci_manager.py", line 193, in set_hvdevs
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
dev_obj = pci_device.PciDevice.create(dev)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/pci_device.py", line 174, in create
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
pci_device.update_device(dev_dict)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/pci_device.py", line 136, in update_device
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
self.extra_info = extra_info
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/base.py", line 70, in setter
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
field.coerce(self, name, value))
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/fields.py", line 166, in coerce
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return self._type.coerce(obj, attr, value)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/fields.py", line 332, in coerce
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup obj,
'%s["%s"]' % (attr, key), element)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/fields.py", line 166, in coerce
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
return self._type.coerce(obj, attr, value)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup File
"/opt/stack/nova/nova/objects/fields.py", line 218, in coerce
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
value.__class__.__name__)
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
ValueError: A string is required here, not list
2014-01-09 11:13:11.973 TRACE nova.openstack.common.threadgroup
I checked in source that problem is probably due to "phys_function":
[["0x0000", "0x02", "0x00", "0x0"]] in dict with devices. So I wonder is
it supported in havana release and I made something wrong or maybe it is
not implemented in openstack yet?
I prepare kernel and kvm correctly because i test running vm directly
with qemu and this Virtual Function of my network card and it works
fine.
My Ethernet is Intel 82599:
lspci | grep 82599
02:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit
SFI/SFP+ Network Connection (rev 01)
02:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit
SFI/SFP+ Network Connection (rev 01)
02:10.0 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01)
02:10.1 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01)
02:10.2 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01)
02:10.3 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01)
02:10.4 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01)
02:10.5 Ethernet controller: Intel Corporation 82599 Ethernet Controller
Virtual Function (rev 01)
Thanks in advance for any help :)
--
Sławek Kapłoński
slawek at kaplonski.pl
More information about the Openstack
mailing list