[openstack-dev] [nova] A problem about pci-passthrough

yongli he yongli.he at intel.com
Tue Mar 4 01:28:22 UTC 2014


On 2014年03月03日 22:21, Alexis Lee wrote:
> Liuji (Jeremy) said on Mon, Mar 03, 2014 at 08:06:57AM +0000:
>> Test scenario:
>> 1)There are two compute nodes in the environment named A and B. A has two NICs of vendor_id='8086' and product_id='105e', B has two NICs of vendor_id='8086' and product_id='10c9'.
>> 2)I configured "pci_alias={"vendor_id":"8086", "product_id":"10c9", "name":"a1"}" in nova.conf on the controller node, and of course the pci_passthrough_whitelist on this two compute nodes seperately.
>> 3)Finally, a flavor named "MyTest" with extra_specs= {u'pci_passthrough:alias': u'a1:1'}
>> 4)When I create a new instance with the "MyTest" flavor, it starts or is error randomly.
>>
>> The problem is in the _schedule function of nova/scheduler/filter_scheduler.py:
>>              chosen_host = random.choice(
>>                  weighed_hosts[0:scheduler_host_subset_size])
>>              selected_hosts.append(chosen_host)
>>
>>              # Now consume the resources so the filter/weights
>>              # will change for the next instance.
>>              chosen_host.obj.consume_from_instance(instance_properties)
>>
>> while "scheduler_host_subset_size" is configured to 2, the
>> weighed_hosts are A and B, but the chosen_host is selected randomly.
>> When chosen_host is B, the instance starts, but when chosen_host is A,
>> the instance becomes error. The "consume_from_instance" will raise a
>> exception.
> Hi Jeremy,
>
> You didn't mention the PciPassthroughFilter, have you enabled this in
definitely need this filter.

Yongli He
> your scheduler?
>    https://wiki.openstack.org/wiki/Pci_passthrough
>
>
> Alexis




More information about the OpenStack-dev mailing list