← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1496565] [NEW] Nova instance create fails when passing PCI alias

 

Public bug reported:

Running kilo master devstack on ubuntu 15.04. Created pci-whitelist and
alias in local.conf and is visible in nova.conf per
https://wiki.openstack.org/wiki/Pci_passthrough

Added PCI alias to a nova flavor. When lauching instance with that flavor, it fails saying alias not found.
n-api log attached

nova boot --image 0f586895-ea84-48ed-a527-0b2fcbe79d05  --flavor m1.small i1
ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.PciRequestAliasNotDefined'> (HTTP 500) (Request-ID: req-03607684-2cf3-461e-97cc-2359a7a1c916)

>From local.conf
pci_passthrough_whitelist={ "vendor_id":"15b3","product_id":"1004","address":"0004:01:00.*", "physical_network":"physnet1"}
pci_alias={"vendor_id":"15b3", "product_id":"1004", "name":"m1"}


 nova flavor-show 2
+----------------------------+-----------------------------------+
| Property                   | Value                             |
+----------------------------+-----------------------------------+
| OS-FLV-DISABLED:disabled   | False                             |
| OS-FLV-EXT-DATA:ephemeral  | 0                                 |
| disk                       | 20                                |
| extra_specs                | {"pci_passthrough:alias": "m1:1"} |
| id                         | 2                                 |
| name                       | m1.small                          |
| os-flavor-access:is_public | True                              |
| ram                        | 2048                              |
| rxtx_factor                | 1.0                               |
| swap                       |                                   |
| vcpus                      | 1                                 |


git log -1
commit 7594b100128bdd4f6397dacf8de4d4c3059f6bb3
Merge: 1d0b0d3 4b115ad
Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
Date:   Thu Sep 3 22:24:40 2015 +0000

    Merge "Convert identity defaults to keystone v3 api"

n-api
7050>>' _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:792
2015-09-16 19:34:40.597 INFO nova.osapi_compute.wsgi.server [req-c8f4dbbb-00c0-44a8-b4ce-ad9187c151e1 admin admin] 10.222.173.71 "GET /v2.1/012991f796ad4cbb92b9ff9b8b3bcbf1/flavors/2 HTTP/1.1" status: 200 len: 698 time: 0.2890520
2015-09-16 19:34:40.647 DEBUG nova.api.openstack.wsgi [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x7f8697d3d0>>, body: {"server": {"min_count": 1, "flavorRef": "2", "name": "i1", "imageRef": "0f586895-ea84-48ed-a527-0b2fcbe79d05", "max_count": 1}} _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:789
2015-09-16 19:34:43.265 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=SchedulerHints, alias=os-scheduler-hints, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.268 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=Keypairs, alias=os-keypairs, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.270 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=BlockDeviceMapping, alias=os-block-device-mapping, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.272 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=AccessIPs, alias=os-access-ips, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.274 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=BlockDeviceMappingV1, alias=os-block-device-mapping-v1, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.277 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=DiskConfig, alias=os-disk-config, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.279 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=UserData, alias=os-user-data, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.281 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=AvailabilityZone, alias=os-availability-zone, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.284 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=MultipleCreate, alias=os-multiple-create, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.286 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=Personality, alias=os-personality, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.289 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=SecurityGroups, alias=os-security-groups, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:43.291 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=ConfigDrive, alias=os-config-drive, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
2015-09-16 19:34:50.688 ERROR nova.api.openstack.extensions [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Unexpected exception in API method
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions Traceback (most recent call last):
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 597, in create
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     **create_kwargs)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/hooks.py", line 149, in inner
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     rv = f(*args, **kwargs)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1557, in create
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     check_server_group_quota=check_server_group_quota)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1162, in _create_instance
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     auto_disk_config, reservation_id, max_count)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 934, in _validate_and_build_base_options
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     instance_type)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/pci/request.py", line 192, in get_pci_requests_from_flavor
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     flavor['extra_specs']['pci_passthrough:alias'])
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/pci/request.py", line 144, in _translate_alias_to_requests
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     raise exception.PciRequestAliasNotDefined(alias=name)
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions PciRequestAliasNotDefined: PCI alias m1 is not defined
2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions
2015-09-16 19:34:50.712 INFO nova.api.openstack.wsgi [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.PciRequestAliasNotDefined'>
2015-09-16 19:34:50.720 DEBUG nova.api.openstack.wsgi [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'nova.exception.PciRequestAliasNotDefined'> __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1175
2015-09-16 19:34:50.725 INFO nova.osapi_compute.wsgi.server [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] 10.222.173.71 "POST /v2.1/012991f796ad4cbb92b9ff9b8b3bcbf1/servers HTTP/1.1" status: 500 len: 517 time: 10.1117899

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1496565

Title:
  Nova instance create fails when passing PCI alias

Status in OpenStack Compute (nova):
  New

Bug description:
  Running kilo master devstack on ubuntu 15.04. Created pci-whitelist
  and alias in local.conf and is visible in nova.conf per
  https://wiki.openstack.org/wiki/Pci_passthrough

  Added PCI alias to a nova flavor. When lauching instance with that flavor, it fails saying alias not found.
  n-api log attached

  nova boot --image 0f586895-ea84-48ed-a527-0b2fcbe79d05  --flavor m1.small i1
  ERROR (ClientException): Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.PciRequestAliasNotDefined'> (HTTP 500) (Request-ID: req-03607684-2cf3-461e-97cc-2359a7a1c916)

  From local.conf
  pci_passthrough_whitelist={ "vendor_id":"15b3","product_id":"1004","address":"0004:01:00.*", "physical_network":"physnet1"}
  pci_alias={"vendor_id":"15b3", "product_id":"1004", "name":"m1"}


   nova flavor-show 2
  +----------------------------+-----------------------------------+
  | Property                   | Value                             |
  +----------------------------+-----------------------------------+
  | OS-FLV-DISABLED:disabled   | False                             |
  | OS-FLV-EXT-DATA:ephemeral  | 0                                 |
  | disk                       | 20                                |
  | extra_specs                | {"pci_passthrough:alias": "m1:1"} |
  | id                         | 2                                 |
  | name                       | m1.small                          |
  | os-flavor-access:is_public | True                              |
  | ram                        | 2048                              |
  | rxtx_factor                | 1.0                               |
  | swap                       |                                   |
  | vcpus                      | 1                                 |

  
  git log -1
  commit 7594b100128bdd4f6397dacf8de4d4c3059f6bb3
  Merge: 1d0b0d3 4b115ad
  Author: Jenkins <jenkins@xxxxxxxxxxxxxxxxxxxx>
  Date:   Thu Sep 3 22:24:40 2015 +0000

      Merge "Convert identity defaults to keystone v3 api"

  n-api
  7050>>' _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:792
  2015-09-16 19:34:40.597 INFO nova.osapi_compute.wsgi.server [req-c8f4dbbb-00c0-44a8-b4ce-ad9187c151e1 admin admin] 10.222.173.71 "GET /v2.1/012991f796ad4cbb92b9ff9b8b3bcbf1/flavors/2 HTTP/1.1" status: 200 len: 698 time: 0.2890520
  2015-09-16 19:34:40.647 DEBUG nova.api.openstack.wsgi [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Action: 'create', calling method: <bound method ServersController.create of <nova.api.openstack.compute.servers.ServersController object at 0x7f8697d3d0>>, body: {"server": {"min_count": 1, "flavorRef": "2", "name": "i1", "imageRef": "0f586895-ea84-48ed-a527-0b2fcbe79d05", "max_count": 1}} _process_stack /opt/stack/nova/nova/api/openstack/wsgi.py:789
  2015-09-16 19:34:43.265 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=SchedulerHints, alias=os-scheduler-hints, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.268 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=Keypairs, alias=os-keypairs, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.270 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=BlockDeviceMapping, alias=os-block-device-mapping, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.272 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=AccessIPs, alias=os-access-ips, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.274 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=BlockDeviceMappingV1, alias=os-block-device-mapping-v1, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.277 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=DiskConfig, alias=os-disk-config, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.279 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=UserData, alias=os-user-data, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.281 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=AvailabilityZone, alias=os-availability-zone, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.284 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=MultipleCreate, alias=os-multiple-create, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.286 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=Personality, alias=os-personality, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.289 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=SecurityGroups, alias=os-security-groups, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:43.291 DEBUG nova.api.openstack.compute.servers [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Running _create_extension_point for <Extension: name=ConfigDrive, alias=os-config-drive, version=1> _create_extension_point /opt/stack/nova/nova/api/openstack/compute/servers.py:686
  2015-09-16 19:34:50.688 ERROR nova.api.openstack.extensions [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Unexpected exception in API method
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions Traceback (most recent call last):
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/extensions.py", line 478, in wrapped
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     return f(*args, **kwargs)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/validation/__init__.py", line 73, in wrapper
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     return func(*args, **kwargs)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/api/openstack/compute/servers.py", line 597, in create
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     **create_kwargs)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/hooks.py", line 149, in inner
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     rv = f(*args, **kwargs)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1557, in create
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     check_server_group_quota=check_server_group_quota)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 1162, in _create_instance
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     auto_disk_config, reservation_id, max_count)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/compute/api.py", line 934, in _validate_and_build_base_options
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     instance_type)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/pci/request.py", line 192, in get_pci_requests_from_flavor
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     flavor['extra_specs']['pci_passthrough:alias'])
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions   File "/opt/stack/nova/nova/pci/request.py", line 144, in _translate_alias_to_requests
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions     raise exception.PciRequestAliasNotDefined(alias=name)
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions PciRequestAliasNotDefined: PCI alias m1 is not defined
  2015-09-16 19:34:50.688 13216 ERROR nova.api.openstack.extensions
  2015-09-16 19:34:50.712 INFO nova.api.openstack.wsgi [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] HTTP exception thrown: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.PciRequestAliasNotDefined'>
  2015-09-16 19:34:50.720 DEBUG nova.api.openstack.wsgi [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] Returning 500 to user: Unexpected API Error. Please report this at http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'nova.exception.PciRequestAliasNotDefined'> __call__ /opt/stack/nova/nova/api/openstack/wsgi.py:1175
  2015-09-16 19:34:50.725 INFO nova.osapi_compute.wsgi.server [req-03607684-2cf3-461e-97cc-2359a7a1c916 admin admin] 10.222.173.71 "POST /v2.1/012991f796ad4cbb92b9ff9b8b3bcbf1/servers HTTP/1.1" status: 500 len: 517 time: 10.1117899

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1496565/+subscriptions


Follow ups