Computes using the RequestSpec object

Registered by Sylvain Bauza on 2016-11-10

Disclaimer, that's a full refactoring-only blueprint not adding more features.

At the moment, we're using the RequestSpec object by the API which creates it or finds it and passes then it to the conductor.
By the conductor, we have a lot of primitiving methods for transforming that object into legacy dictionaries called request_spec and filter_properties.
At the moment, we're calling the compute RPC API by using those legacy dicts instead of passing the object directly.

The rationale behing this blueprint would be to stop primitiving the RequestSpec object in the conductor, pass directly the object to the compute, pass it back to the conductor in case of a reschedule, and also deprecate and/or remove the conductor RPC API parameters that are the legacy request_spec and filter_properties dicts (if we already pass the RequestSpec object instead).

Blueprint information

Matt Riedemann
Sylvain Bauza
Needs approval
Sylvain Bauza
Pending Approval
Series goal:
Needs Code Review
Milestone target:
Started by
Matt Riedemann on 2017-06-01

Related branches



This is technical debt cleanup so I'm OK with this as a specless blueprint for tracking the series of changes. -- mriedem 20161110

I'm deferring this to Pike as we're two weeks from the Ocata feature freeze and there is no code up for this yet, and I think anything being put up for this right now would be a distraction from the other priorities we need to get merged. -- mriedem 20170112

This work is targeted for Pike indeed, I'm planning to provide changes using that specific Gerrit tag. -- bauzas 20170322

Gerrit topic:,topic:bp/request-spec-use-by-compute,n,z

Addressed by:
    _schedule_instances() supporting a RequestSpec object

Is this blueprint complete or is there more work yet to be done? -- mriedem 20170717

There are more patches needed but given scheduler-claims will change a lot of RPC APIs (at least the compute RPC API) to pass alternatives, I preferred to defer that blueprint as much as I can in order to not trample the main scheduler priority with changes that would create conflicts -- sbauza 20170718

OK I'll defer this to Queens then for the rest of the work. -- mriedem 20170719

Addressed by:
    Modernize set_vm_state_and_notify

Addressed by:
    Remove dest node allocation if evacuate MoveClaim fails

Addressed by:
    Add recreate test for forced host evacuate not setting dest allocations

Addressed by:
    Add a test to make sure failed evacuate cleans up dest allocation

Addressed by:
    Add recreate test for evacuate claim failure

Addressed by:
    Create allocations against forced dest host during evacuate

Addressed by:
    Refactor out claim_resources_on_destination into a utility

Gerrit topic:,topic:bug/1713786,n,z

Addressed by:
    Add recreate test for forced host evacuate not setting dest allocations

Addressed by:
    Use the RequestSpec when getting scheduler_hints in compute

Addressed by:
    Pass RequestSpec to ConductorTaskAPI.build_instances

I'm going to defer this to Rocky. There were only two changes merged in Queens for this work and there is still more to do but it's too late in Queens to start any major new patches for this. -- mriedem 20180110

Deferring this out of Rocky. Really not sure that we even need a blueprint for this given the work is very random and can be done in chunks - basically cleanup a lot of TODOs in the code from when request spec was added. -- mriedem 20180607

Addressed by:
    Add nova-status upgrade check for request spec migrations

Addressed by:
    Pass request_spec from compute to cell conductor on reschedule

Addressed by:
    Drop request spec migration code

Gerrit topic:,topic:bug/1774205,n,z

Addressed by:
    Remove legacy request spec compat code from API

Addressed by:
    Remove legacy RequestSpec compat code from live migrate task

Addressed by:
    Remove legacy RequestSpec compat from conductor unshelve_instance

Addressed by:
    Remove legacy RequestSpec compat from conductor rebuild_instance

Gerrit topic:

Addressed by:
    Remove Request Spec Migration upgrade status check


Work Items

This blueprint contains Public information 
Everyone can see this information.