Ask Your Question
0

PCI Passthrough Filter Error Pike Ubuntu

asked 2017-11-01 12:35:40 -0500

Troy JeepGuy gravatar image

updated 2017-11-01 13:33:05 -0500

A bit of background: I've got an application that needs to run on a VM that requires a hardware USB key. My thought was to install a PCIe USB adapter, passthrough the entire device to this specific VM, and plug the hardware key into the USB adapter. Sounds easy enough.

I suspect I'm missing some small detail and when someone points it out I can smack my head and say "Dohhh"

I followed instructions here: https://docs.openstack.org/nova/pike/admin/pci-passthrough.html (https://docs.openstack.org/nova/pike/...)

For the controller node:

root@controller:/etc/nova# grep ^enabled_filter nova.conf 
enabled_filters = RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter, PciPassthroughFilter

root@controller:/etc/nova# grep ^alias nova.conf 
alias = { "name":"pciusb", "product_id":"0014", "vendor_id":"1912", "device_type":"type-PCI" }

root@controller:/etc/nova# openstack flavor show u.1.010.8
+----------------------------+--------------------------------------+
| Field                      | Value                                |
+----------------------------+--------------------------------------+
| OS-FLV-DISABLED:disabled   | False                                |
| OS-FLV-EXT-DATA:ephemeral  | 0                                    |
| access_project_ids         | None                                 |
| disk                       | 8                                    |
| id                         | 02bcc0b6-b41f-4c4b-a21d-910908af5407 |
| name                       | u.1.010.8                            |
| os-flavor-access:is_public | True                                 |
| properties                 | pci_passthrough:alias='pciusb:1'     |
| ram                        | 1024                                 |
| rxtx_factor                | 1.0                                  |
| swap                       |                                      |
| vcpus                      | 1                                    |
+----------------------------+--------------------------------------+

For the compute node:

root@compute2:/etc/nova# dmesg|grep -iE "dmar|iommu"|more
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-4.4.0-97-generic root=/dev/mapper/compute2-root ro nodmraid intel_iommu=on
[    0.000000] ACPI: DMAR 0x000000007F3B3668 0001B0 (v01 DELL   PE_SC3   00000001 DELL 00000001)
[    0.000000] Kernel command line: BOOT_IMAGE=/vmlinuz-4.4.0-97-generic root=/dev/mapper/compute2-root ro nodmraid intel_iommu=on
[    0.000000] DMAR: IOMMU enabled

root@compute2:/etc/nova# grep ^passthrough_ nova.conf; grep ^alias nova.conf 
passthrough_whitelist = { "vendor_id":"1912", "product_id":"0014" }
alias = { "name": "pciusb", "product_id": "0014", "vendor_id": "1912", "device_type": "type-PCI" }

I suspect this is all working because I can see the device on the controller node in the database and the compute node nova is happily reporting the device.

    MariaDB [nova]> select * from pci_devices;
+---------------------+---------------------+------------+---------+----+-----------------+--------------+------------+-----------+----------+------------------+-----------------+-----------+------------+---------------+------------+-----------+-------------+--------------------------------------+
| created_at          | updated_at          | deleted_at | deleted | id | compute_node_id | address      | product_id | vendor_id | dev_type | dev_id           | label           | status    | extra_info | instance_uuid | request_id | numa_node | parent_addr | uuid                                 |
+---------------------+---------------------+------------+---------+----+-----------------+--------------+------------+-----------+----------+------------------+-----------------+-----------+------------+---------------+------------+-----------+-------------+--------------------------------------+
| 2017-10-30 21:54:16 | 2017-11-01 16:50:37 | NULL       |       0 |  1 |               2 | 0000:06:00.0 | 0014       | 1912      | type-PCI | pci_0000_06_00_0 | label_1912_0014 | available | {}         | NULL          | NULL       |      NULL | NULL        | 2e493c5e-e856-4f9f-a59e-cbbfc27c0f7b |
+---------------------+---------------------+------------+---------+----+-----------------+--------------+------------+-----------+----------+------------------+-----------------+-----------+------------+---------------+------------+-----------+-------------+--------------------------------------+
root@compute2:/var/log/nova# tail -n1 nova-compute.log
    2017-11-01 10:21:59.019 27490 INFO nova.compute.resource_tracker [req-eb82d9ed-cb57-4136-ae7a-0175acb9b265 - - - - -] Final resource view: name=compute2 phys_ram=48351MB used_ram=2560MB phys_disk=459GB used_disk=16GB total_vcpus=16 used_vcpus=4 pci_stats=[PciDevicePool(count=1,numa_node=None,product_id='0014',tags={dev_type='type-PCI'},vendor_id='1912')]

And this is where the problems start:

root@controller:/var/log/nova# grep -ir req-ec5739e8-9fc9-48a9-9fdd-b391644d7006 
nova-conductor.log:2017-11-01 10:26:42.171 10238 ERROR nova.scheduler.utils [req-ec5739e8-9fc9-48a9-9fdd-b391644d7006 3e9103c264344366a1e6759807a564e4 309aa8e5a88c418ba0d86151d373355a - default default] [instance: 9c37a97e-d544-4da1-be1e-47a3312135ca] Error from last host: compute2 (node compute2): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1826, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2056, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance 9c37a97e-d544-4da1-be1e-47a3312135ca was re-scheduled: internal error: qemu unexpectedly closed the ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-03-19 08:06:35 -0500

Sivakumar gravatar image

Hello,

Did you fixed this issue?

Could you please provide the support.

Thanks

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-11-01 12:35:40 -0500

Seen: 194 times

Last updated: Mar 19