[nova] Selecting PCI devices by their addresses

Sean Mooney smooney at redhat.com
Wed Jan 20 15:39:39 UTC 2021


On Wed, 2021-01-20 at 10:08 -0500, Mauricio Tavares wrote:
> Stupid question of the day: if I am not mistaken, I can ask nova[1]
> which pci/pcie devices it knows and where they are.
> 
not via any api no.
nova track pci deivces that have been whitelisted in an internal database
but as an enduser you cannot query this infomation via a pulbic api currently.
>  And it will reply
> with the PCI address for each device it knows of. But, when I want to
> create flavours so I can create (libvirt-based) instances using them,
> I cannot tie an alias to a specific pci address;
> 
partly correct, in that you cannot create and alias that uses a specific pci adress.
the alias must be the same on all compute nodes and the nova-api so they cannot refer
to a spcieic card.
>  all I can do is say
> "this pci_alias is for all the pci devices with this vendor_id and
> product_id that I whitelisted already"[2]. Since libvirt allows me to
> feed a vm guest the exact pci device I want, could anyone point out
> which obvious step I am missing here?
openstack is a cloud plathform and in that plathform nova act as a compute resouce orcetrator.
as part of that role it provides a layer of indirectly between the avaiable resouce and the users
request. as a result it is not within the scope of nova to povide an api to place a device in a speicic
host with a specifc set of resouce chosen by an external user.

as a standard tenant you should not be aware of the device on a given hypervior and technially should not
know which hypervir is used behine the nova api. e.g. you should not know via a pulic non admin api if
openstack is using livbrt or vmware.

so you are not missing anything obvior in the feature we support. we intentionally do not support
the usecase your are requesting. to select device on a libvirt host for a given vm a enterprise virutalistion
software stack such as ovirt, proxmox or esxi without vsphere is more suitable.


can you descibe the acutl usecase that you are trying to solve with direct selection of pci devices.
there may be a cloud native way we support to fultil that usecase but the solution your are tryign
to implemnt is not supported by openstack by design.
> 
> [1] https://wiki.openstack.org/wiki/Pci-api-support
> [2] https://docs.openstack.org/nova/latest/admin/pci-passthrough.html#configure-nova-compute-compute
> 





More information about the openstack-discuss mailing list