Placement API claiming resources

Registered by Sylvain Bauza on 2017-02-23

For the moment, the Placement API only calculates the free resources by decreasing the inventories with the sum of allocations. That is suboptimal because in the meantime where a request is placed and a request is fulfilled, other requests can come in and getting a wrong target in case the resource usage wasn't accurate.

The idea of that blueprint is to allow the Placement to have a way to consider intermediate resource locking until the request is fully fulfilled (ie. an instance is created).

Blueprint information

Status:
Complete
Approver:
Matt Riedemann
Priority:
Essential
Drafter:
Sylvain Bauza
Direction:
Approved
Assignee:
Jay Pipes
Definition:
Approved
Series goal:
Accepted for pike
Implementation:
Implemented
Milestone target:
milestone icon pike-3
Started by
Matt Riedemann on 2017-04-27
Completed by
Matt Riedemann on 2017-07-28

Related branches

Sprints

Whiteboard

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

Addressed by: https://review.openstack.org/437424
    Super WIP: Placement doing claims

Approved for Pike. Let's get started on POC so we have something to talk about at the Forum in Boston. -- mriedem 20170425

Addressed by: https://review.openstack.org/460113
    Add reserved_host_cpus option

Addressed by: https://review.openstack.org/460177
    WIP: Don't delete allocation if instance being scheduled

Addressed by: https://review.openstack.org/460433
    WIP: Delete existing allocations for move operations or retries

Addressed by: https://review.openstack.org/460455
    WIP: Allocate instance by the conductor

Addressed by: https://review.openstack.org/462679
    Add a convenience attribute for reportclient

Addressed by: https://review.openstack.org/463623
    WIP - pass all instance IDs to scheduler

Addressed by: https://review.openstack.org/463993
    WIP - have scheduler claim resources

Addressed by: https://review.openstack.org/464086
    Make the method to put allocations public

Addressed by: https://review.openstack.org/465171
    Pass a list of instance UUIDs to scheduler

Addressed by: https://review.openstack.org/465174
    Remove selecting host based on host_subset_size

Addressed by: https://review.openstack.org/465175
    WIP: Scheduler returning more than 1 host

Addressed by: https://review.openstack.org/465767
    WIP - Pass the number of hosts to return explicitly

Addressed by: https://review.openstack.org/465768
    WIP - return multiple hosts from select_destinations

Addressed by: https://review.openstack.org/466725
    Fix ChanceScheduler returning a wrong node

Addressed by: https://review.openstack.org/469037
    _schedule_instances() supporting a RequestSpec object

Gerrit topic: https://review.openstack.org/#q,topic:bp/placement-claims-4,n,z

Addressed by: https://review.openstack.org/482381
    scheduler: alternates for filter scheduler

Addressed by: https://review.openstack.org/482382
    placement: add claim_resources() to report client

Addressed by: https://review.openstack.org/482383
    placement: claim resources in filter scheduler

Addressed by: https://review.openstack.org/483564
    scheduler: isolate _get_sorted_hosts()

Addressed by: https://review.openstack.org/483565
    add dict of allocation requests to select_dests()

Addressed by: https://review.openstack.org/483566
    claim resources in placement API during schedule()

Addressed by: https://review.openstack.org/484988
    Handle None returned from get_allocation_candidates due to connect failure

Addressed by: https://review.openstack.org/486170
    placement: add retry tight loop claim_resources()

Addressed by: https://review.openstack.org/486215
    WIP - add alternate hosts

Addressed by: https://review.openstack.org/486253
    WIP - return alternates along with their allocations

Addressed by: https://review.openstack.org/487227
    Set IronicNodeState.uuid in _update_from_compute_node

Addressed by: https://review.openstack.org/487483
    add a retry on DBDeadlock to _set_allocations()

Addressed by: https://review.openstack.org/487492
    docstring and unused code removal

Addressed by: https://review.openstack.org/487589
    placement: account for move operations in claim

Addressed by: https://review.openstack.org/487958
    Test resize with placement api

Addressed by: https://review.openstack.org/488187
    Sanity check delete_allocation_for_instance

Addressed by: https://review.openstack.org/488352
    DNM: trying to turn on periodic tasks

Addressed by: https://review.openstack.org/488500
    DNM: simulate rpc delay when cleaning up allocations from source node

As of https://review.openstack.org/#/c/483566/ I'm going to consider this complete for Pike. We have some more stuff to work on in Queens, like sending alternatives to the cell conductor, but that's going to be separate. -- mriedem 20170728

Gerrit topic: https://review.openstack.org/#q,topic:bug/1707071,n,z

Addressed by: https://review.openstack.org/492234
    Require Placement 1.0 in nova-status upgrade check

Gerrit topic: https://review.openstack.org/#q,topic:bp/placement-allocation-requests,n,z

Addressed by: https://review.openstack.org/495854
    WIP - Add allocations to the values returned from the scheduler

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.