add pci_requests to the instance object

Bug #1368260 reported by Baodong (Robert) Li
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Dan Smith

Bug Description

With the refactoring work moving PCI requests from system_metadata to instance_extra, PCI requests are no longer accessible from the instance object. Refer to https://review.openstack.org/#/c/118391/. One of the issues is that the scheduler while consuming PCI requests (see consume_from_instance in host_manager.py) needs access to db to get the PCI requests. Another issue is that the compute node would need multiple DB accesses to get the PCI requests, while if they are part of the instances, they can become available together with the instance.

Revision history for this message
Dan Smith (danms) wrote :

Yes, we need to be able to preload the pci_request information when querying the instance so that it doesn't need a lazy load or a new db request to get there in paths where we know it's going to be needed.

Changed in nova:
assignee: nobody → Dan Smith (danms)
importance: Undecided → Medium
milestone: none → kilo-1
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/120857

Changed in nova:
assignee: Dan Smith (danms) → Baodong (Robert) Li (baoli)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/120857
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=5e8ae4711462f0ec344c13bb5f21f42503b7caff
Submitter: Jenkins
Branch: master

commit 5e8ae4711462f0ec344c13bb5f21f42503b7caff
Author: Robert Li <email address hidden>
Date: Thu Sep 11 13:46:26 2014 -0400

    Mitigating performance impact with getting pci requests from DB

    This change mitigates the performance impact in host manager that
    retrieves an instance's PCI requests from DB while consuming it. This
    is achieved by adding pci_requests into the instance dict before
    calling consume_from_instance() and deleting it afterwards. The
    complete solution will be provided when bug 1368260 is fully
    addressed. The patch also removes the unnecessary context argument.

    Change-Id: Ib0d12cde1c297a04e5d626b28d0a994c5dd4d965
    Partial-Bug: 1368260

Changed in nova:
status: In Progress → Confirmed
Changed in nova:
assignee: Baodong (Robert) Li (baoli) → Dan Smith (danms)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/125482
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=aa67a51299faa5e51da2e96fcf3b0ba3fc2ddc86
Submitter: Jenkins
Branch: master

commit aa67a51299faa5e51da2e96fcf3b0ba3fc2ddc86
Author: Dan Smith <email address hidden>
Date: Tue Sep 30 12:42:34 2014 -0700

    Make pci_requests a proper field on Instance object

    When we added the pci_requests object, we didn't plumb it all the way into the
    Instance object because of time constraints. This finishes that work so that it
    behaves properly and doesn't require an additional DB lookup every time we need to
    pull it based on an instance.

    Partial-Bug: #1368260
    Change-Id: I134441c8288d5dbdc0bac6163cb2affc9f0af762

tags: added: pci-passthrough
Revision history for this message
John Garbutt (johngarbutt) wrote :

Seem to have got fixes in for this now, we should reopen a new bug for any remaining issues.

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.