Re: [openstack-dev] [Nova][SR-IOV][pci-passthrough] Reporting pci devices in hypervisor-show

2016-07-11 Thread Daniel P. Berrange
On Fri, Jul 08, 2016 at 03:45:10PM -0400, Jay Pipes wrote:
> On 07/08/2016 12:10 PM, Beliveau, Ludovic wrote:
> > I see a lot of values in having something like this for inventory
> > purposes and troubleshooting.
> > 
> > IMHO the information should be provided in two ways.
> > 
> > 1. Show PCI pools status per compute.  Currently the pools only have
> > information about how many devices are allocated in a pool ("count").
> > We should also derive from the pci_devices db table the number of PCI
> > devices that are available per pool (not just the number of allocated).
> > This information could be included in the hypervisor-show (or a new REST
> > API if this is found to be too noisy).
> > 
> > 2. More detailed information about each individual PCI devices (like you
> > are suggesting: parent device relationships, etc.).  This could be in a
> > separate REST API call.
> > 
> > We could even think about a third option where we could be showing
> > global PCI pools information for a whole region.
> > 
> > For discussions purposes, here's what pci_stats for a compute looks like
> > today:
> > {"count": 1, "numa_node": 0, "vendor_id": "8086", "product_id": "10fb",
> > "tags": {"dev_type": "type-PF", "physical_network": "default"}},
> > "nova_object.namespace": "nova"}
> > {"count": 3, "numa_node": 0, "vendor_id": "8086", "product_id": "10ed",
> > "tags": {"dev_type": "type-VF", "physical_network": "default"}},
> > "nova_object.namespace": "nova"}]}, "nova_object.namespace": "nova"}
> > 
> > Is there an intention to write a blueprint for this feature ?  If there
> > are interests, I don't mind working on it.
> 
> Personally, I hate the PCI device pool code and the whole concept of storing
> this aggregate "pool" information in the database (where it can easily
> become out of sync with the underlying PCI device records).

Yep, I really think we should avoid exposing this concept in our API,
at all costs. Aside from the issue you mentiohn, there's a second
issue that our PCI device code is almost certainly going to have to
be generalized in to host device code, since in order to support
TPMs, vGPUs and FPGAs, we're going to need to start tracking many
host devices which are not PCI. We should bear this in mind when
considered any public API exposure of PCI devices, as we don't want
to add an API that is immediately broken by need to add non-PCI
devices


Regards,
Daniel
-- 
|: http://berrange.com  -o-http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org  -o- http://virt-manager.org :|
|: http://autobuild.org   -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org   -o-   http://live.gnome.org/gtk-vnc :|

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Nova][SR-IOV][pci-passthrough] Reporting pci devices in hypervisor-show

2016-07-08 Thread Jay Pipes

On 07/08/2016 12:10 PM, Beliveau, Ludovic wrote:

I see a lot of values in having something like this for inventory
purposes and troubleshooting.

IMHO the information should be provided in two ways.

1. Show PCI pools status per compute.  Currently the pools only have
information about how many devices are allocated in a pool ("count").
We should also derive from the pci_devices db table the number of PCI
devices that are available per pool (not just the number of allocated).
This information could be included in the hypervisor-show (or a new REST
API if this is found to be too noisy).

2. More detailed information about each individual PCI devices (like you
are suggesting: parent device relationships, etc.).  This could be in a
separate REST API call.

We could even think about a third option where we could be showing
global PCI pools information for a whole region.

For discussions purposes, here's what pci_stats for a compute looks like
today:
{"count": 1, "numa_node": 0, "vendor_id": "8086", "product_id": "10fb",
"tags": {"dev_type": "type-PF", "physical_network": "default"}},
"nova_object.namespace": "nova"}
{"count": 3, "numa_node": 0, "vendor_id": "8086", "product_id": "10ed",
"tags": {"dev_type": "type-VF", "physical_network": "default"}},
"nova_object.namespace": "nova"}]}, "nova_object.namespace": "nova"}

Is there an intention to write a blueprint for this feature ?  If there
are interests, I don't mind working on it.


Personally, I hate the PCI device pool code and the whole concept of 
storing this aggregate "pool" information in the database (where it can 
easily become out of sync with the underlying PCI device records).


In fact, I hate it so much I created a spec/blueprint about it:

http://specs.openstack.org/openstack/nova-specs/specs/mitaka/approved/pci-stats-generate.html

-jay


On 07/08/2016 07:11 AM, Murray, Paul (HP Cloud) wrote:


Hi All,

At the moment I am not aware of a nova api call that provides
information about the pci devices on a host. The most obvious place to
put this would be in hypervisor-show. I wonder if anyone has made an
attempt at this already or if there are any reasons for not adding pci
information there?

Assuming pci device information was put in hypervisor-show I would be
interested in how people think it would be presented. There are
different types of pci device and things like virtual functions and
parent device relationships. The information should include the
allocation status.

If hypervisor-show is not the place for this I would be interested in
suggestions on where it should go.

Paul





__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [Nova][SR-IOV][pci-passthrough] Reporting pci devices in hypervisor-show

2016-07-08 Thread Beliveau, Ludovic
I see a lot of values in having something like this for inventory purposes and 
troubleshooting.

IMHO the information should be provided in two ways.

1. Show PCI pools status per compute.  Currently the pools only have 
information about how many devices are allocated in a pool ("count").  We 
should also derive from the pci_devices db table the number of PCI devices that 
are available per pool (not just the number of allocated).  This information 
could be included in the hypervisor-show (or a new REST API if this is found to 
be too noisy).

2. More detailed information about each individual PCI devices (like you are 
suggesting: parent device relationships, etc.).  This could be in a separate 
REST API call.

We could even think about a third option where we could be showing global PCI 
pools information for a whole region.

For discussions purposes, here's what pci_stats for a compute looks like today:
{"count": 1, "numa_node": 0, "vendor_id": "8086", "product_id": "10fb", "tags": 
{"dev_type": "type-PF", "physical_network": "default"}}, 
"nova_object.namespace": "nova"}
{"count": 3, "numa_node": 0, "vendor_id": "8086", "product_id": "10ed", "tags": 
{"dev_type": "type-VF", "physical_network": "default"}}, 
"nova_object.namespace": "nova"}]}, "nova_object.namespace": "nova"}

Is there an intention to write a blueprint for this feature ?  If there are 
interests, I don't mind working on it.

/ludovic


On 07/08/2016 07:11 AM, Murray, Paul (HP Cloud) wrote:
Hi All,

At the moment I am not aware of a nova api call that provides information about 
the pci devices on a host. The most obvious place to put this would be in 
hypervisor-show. I wonder if anyone has made an attempt at this already or if 
there are any reasons for not adding pci information there?

Assuming pci device information was put in hypervisor-show I would be 
interested in how people think it would be presented. There are different types 
of pci device and things like virtual functions and parent device 
relationships. The information should include the allocation status.

If hypervisor-show is not the place for this I would be interested in 
suggestions on where it should go.

Paul


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [Nova][SR-IOV][pci-passthrough] Reporting pci devices in hypervisor-show

2016-07-08 Thread Murray, Paul (HP Cloud)
Hi All,

At the moment I am not aware of a nova api call that provides information about 
the pci devices on a host. The most obvious place to put this would be in 
hypervisor-show. I wonder if anyone has made an attempt at this already or if 
there are any reasons for not adding pci information there?

Assuming pci device information was put in hypervisor-show I would be 
interested in how people think it would be presented. There are different types 
of pci device and things like virtual functions and parent device 
relationships. The information should include the allocation status.

If hypervisor-show is not the place for this I would be interested in 
suggestions on where it should go.

Paul

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev