Support nested resource providers

Registered by Jay Pipes on 2016-10-11

Add support for trees of resource providers. Canonical examples of nested resource providers include creating resource providers for each NUMA node on a compute host and resource providers for SRIOV-enabled physical functions on a compute host.

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
High
Drafter:
Jay Pipes
Direction:
Approved
Assignee:
Jay Pipes
Definition:
Approved
Series goal:
Accepted for queens
Implementation:
Implemented
Milestone target:
None
Started by
Matt Riedemann on 2016-11-28
Completed by
Matt Riedemann on 2018-02-14

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/nested-resource-providers,n,z

Addressed by: https://review.openstack.org/384806
    Correct bug in microversion headers in placement

Addressed by: https://review.openstack.org/384807
    placement: adds REST API for nested providers

Addressed by: https://review.openstack.org/377215
    placement: add get_all_by_root_provider_uuid()

Addressed by: https://review.openstack.org/377138
    placement: add nested resource providers

Addressed by: https://review.openstack.org/385693
    placement: update client to set parent provider

Addressed by: https://review.openstack.org/386710
    Add concept of nested resource providers

Addressed by: https://review.openstack.org/414768
    pci: add uuid field to PciDevice object

Addressed by: https://review.openstack.org/414769
    DNM:placement: SRIOV PF devices as child providers

Addressed by: https://review.openstack.org/415920
    virt: adds InventoryTree for nested resources

Addressed by: https://review.openstack.org/415921
    virt: add update_inventory() driver method

We're now past the feature freeze for Ocata so I've deferred this to Pike. -- mriedem 20170128

Addressed by: https://review.openstack.org/449381
    Re-propose nested resource providers spec

Addressed by: https://review.openstack.org/469147
    pci: add uuid field to PciDevice object

Addressed by: https://review.openstack.org/470575
    placement: set/check if inventory change in tree

Addressed by: https://review.openstack.org/480957
    placement: add ProviderTree.is_inventory_empty

We're past feature freeze for Pike so I'm deferring this to Queens. Please re-propose the spec for re-approval in Queens and make any adjustments to the spec as necessary if the design has changed. -- mriedem 20170728

Addressed by: https://review.openstack.org/505209
    Re-propose nested resource providers spec

(Re-)approved for Queens. -- mriedem 20171003

Addressed by: https://review.openstack.org/509030
    rp: streamline InventoryList.get_all_by_rp_uuid()

Addressed by: https://review.openstack.org/509031
    rp: remove dead code in Allocation._create_in_db()

Addressed by: https://review.openstack.org/509032
    rp: remove ability to delete 1 allocation record

Addressed by: https://review.openstack.org/509033
    rp: fix up AllocList.get_by_resource_provider_uuid

Addressed by: https://review.openstack.org/509035
    rp: rework AllocList.get_all_by_consumer_id()

Addressed by: https://review.openstack.org/509029
    rp: remove CRUD operations on Inventory class

Addressed by: https://review.openstack.org/512799
    Reformat _get_all_with_shared

Addressed by: https://review.openstack.org/519243
    placement: Modify scheduler and report API to accept parent uuid

Addressed by: https://review.openstack.org/520243
    Iterator for a provider tree

Addressed by: https://review.openstack.org/520246
    WIP: Use update_inventory from the resource tracker

Addressed by: https://review.openstack.org/520643
    Scheduler set_inventory_for_provider does nested

Addressed by: https://review.openstack.org/520663
    SchedulerReportClient._get_resource_provider_tree

Addressed by: https://review.openstack.org/520756
    WIP: ProviderTree.from_list and SRC.get_provider_tree

Addressed by: https://review.openstack.org/521097
    SchedulerReportClient._get_providers_in_aggregates

Addressed by: https://review.openstack.org/521098
    WIP: Scheduler[Report]Client.get_provider_tree

Addressed by: https://review.openstack.org/521187
    WIP: ComputeDriver.update_provider_tree()

Addressed by: https://review.openstack.org/521041
    (WIP)xenapi(N-R-P): Add API to support compute node resource provider update and create

Addressed by: https://review.openstack.org/521875
    WIP: placement: GET /RPs with aggs, inventories, traits

Addressed by: https://review.openstack.org/522143
    Follow up this patch because it is related with xenapi vgpu implementation

Addressed by: https://review.openstack.org/523932
    Make _Provider really private

Gerrit topic: https://review.openstack.org/#q,topic:bp/nested-resource-providers-patch69,n,z

Addressed by: https://review.openstack.org/521605
    Traits ops on ProviderTree

Addressed by: https://review.openstack.org/526216
    Aggregate ops on ProviderTree

Addressed by: https://review.openstack.org/521685
    Move aggregates from report client to ProviderTree

Addressed by: https://review.openstack.org/521686
    Track provider traits in report client

Addressed by: https://review.openstack.org/526505
    Update nova-status and docs for nova-compute requiring placement 1.14

Addressed by: https://review.openstack.org/526539
    Track associated sharing RPs in report client

Addressed by: https://review.openstack.org/526540
    Raise on API errors getting aggregates/traits

Addressed by: https://review.openstack.org/526541
    Track tree-associated providers in report client

Addressed by: https://review.openstack.org/526973
    [placement] Fix API reference for microversion 1.14

Addressed by: https://review.openstack.org/527728
    WIP: Add nested resources to server moving tests

Addressed by: https://review.openstack.org/530487
    Modify PciDevice.uuid generation code

Addressed by: https://review.openstack.org/530905
    Add an online migration for PciDevice.uuid

Addressed by: https://review.openstack.org/531260
    Fix nits in update_provider_tree series

Addressed by: https://review.openstack.org/531443
    func tests for nested providers in alloc candidate

Addressed by: https://review.openstack.org/531474
    add _has_provider_trees() utility function

Addressed by: https://review.openstack.org/531512
    placement: _get_trees_matching_all()

Addressed by: https://review.openstack.org/531899
    add tests for _get_trees_matching_all() with trait

Addressed by: https://review.openstack.org/532563
    Raise conflict exception on RP create 409

Addressed by: https://review.openstack.org/532564
    WIP: SchedulerReportClient.set_traits_for_provider

Addressed by: https://review.openstack.org/533244
    WIP: ProviderTree.find => ReadOnlyProvider

Addressed by: https://review.openstack.org/533808
    SchedulerReportClient.set_aggregates_for_provider

Addressed by: https://review.openstack.org/533821
    WIP: Scheduler[Report]Client.update_from_provider_tree

Addressed by: https://review.openstack.org/534339
    add test for scenario with sum of child resources

Addressed by: https://review.openstack.org/534866
    fix _get_trees_matching_all() when sum children

Addressed by: https://review.openstack.org/534967
    add _get_usages_from_trees() function

Addressed by: https://review.openstack.org/534968
    WIP - populate alloc cands for trees

Addressed by: https://review.openstack.org/535463
    SchedulerReportClient._delete_provider

Addressed by: https://review.openstack.org/535517
    Move refresh time from report client to prov tree

Addressed by: https://review.openstack.org/536348
    WIP: VMware: implement update_provider_tree()

Addressed by: https://review.openstack.org/536516
    validate provider summary structure

Addressed by: https://review.openstack.org/536624
    ProviderTree.get_provider_uuids: Top-down ordering

Addressed by: https://review.openstack.org/536625
    set_{aggregates|traits}_for_provider: tolerate set

Addressed by: https://review.openstack.org/536902
    fix _ensure_resource_provider()

Addressed by: https://review.openstack.org/537406
    Add update_from_provider_tree() negative test

Addressed by: https://review.openstack.org/537648
    WIP: New-style _set_inventory_for_provider

Addressed by: https://review.openstack.org/539324
    Make generation optional in ProviderTree

We're past feature freeze for Queens so I'm deferring this to Rocky. Please re-propose the spec for re-approval in Rocky and make any adjustments to the spec as necessary if the design has changed. Note that there are still a few patches approved for Queens which we're waiting to merge, up to https://review.openstack.org/#/c/536625/ -- mriedem 20180201

Addressed by: https://review.openstack.org/539738
    Ensure resource classes correctly

Addressed by: https://review.openstack.org/544086
    Update Queens NRP spec to reflect reality

Given the spec amendment: https://review.openstack.org/#/c/544086/ - I'm going to move this back to Queens and mark it as complete since it completed the modeling in Placement and API changes required. Support for nova modeling SR-IOV and NUMA using this isn't done yet, but those are more far-reaching specs which will be separate in Rocky, and therefore it wouldn't be appropriate to re-propose *this* specific spec for Rocky. -- mriedem 20180214

Gerrit topic: https://review.openstack.org/#q,topic:bp/update-provider-tree,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bp/vgpu-rocky,n,z

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.