Commit: 36dbc9fe165e9f9936148a82f1c66e7cc44a9b19
Author: Jay Pipes <email address hidden>
Date: Wed Jun 1 09:52:56 2016
pci: eliminate DB lookup PCI requests during claim
The nova.pci.manager.PciDevTracker.claim_instance() accepted an Instance
object and called nova.objects.InstancePCIRequests.get_by_instance() to
retrieve the PCI requests for the instance. This caused a DB lookup of
the PCI requests for that instance, even though in all situations other
than for migration/resize, the instance's PCI requests were already
retrieved by the resource tracker.
This change removes that additional DB lookup during claim_instance() by
changing the instance parameter to instead be an InstancePCIRequests
object and an InstanceNUMATopology object.
Also in this patch is a change to nova.objects.PciDevice.claim() that
changes the single parameter to an instance UUID instead of an Instance
object, since nothing other than the instance's UUID was used in the
method.
Related-Bug: #1368201
Closes-Bug: #1581471
Change-Id: I9ab10c3035628f083233114b47b43a9b9ecdd166
(cherry picked from commit 1f259e2a9423a4777f79ca561d5e6a74747a5019)
Reviewed: https:/ /review. fuel-infra. org/21473
Submitter: Pkgs Jenkins <email address hidden>
Branch: 9.0/mitaka
Commit: 36dbc9fe165e9f9 936148a82f1c66e 7cc44a9b19
Author: Jay Pipes <email address hidden>
Date: Wed Jun 1 09:52:56 2016
pci: eliminate DB lookup PCI requests during claim
The nova.pci. manager. PciDevTracker. claim_instance( ) accepted an Instance InstancePCIRequ ests.get_ by_instance( ) to
object and called nova.objects.
retrieve the PCI requests for the instance. This caused a DB lookup of
the PCI requests for that instance, even though in all situations other
than for migration/resize, the instance's PCI requests were already
retrieved by the resource tracker.
This change removes that additional DB lookup during claim_instance() by ology object.
changing the instance parameter to instead be an InstancePCIRequests
object and an InstanceNUMATop
Also in this patch is a change to nova.objects. PciDevice. claim() that
changes the single parameter to an instance UUID instead of an Instance
object, since nothing other than the instance's UUID was used in the
method.
Related-Bug: #1368201
Closes-Bug: #1581471
Change-Id: I9ab10c3035628f 083233114b47b43 a9b9ecdd166 77f79ca561d5e6a 74747a5019)
(cherry picked from commit 1f259e2a9423a47