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

Status:
Started
Approver:
Matt Riedemann
Priority:
Low
Drafter:
Sylvain Bauza
Direction:
Needs approval
Assignee:
Sylvain Bauza
Definition:
Pending Approval
Series goal:
None
Implementation:
Needs Code Review
Milestone target:
None
Started by
Matt Riedemann on 2017-06-01

Related branches

Sprints

Whiteboard

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: https://review.openstack.org/#q,topic:bp/request-spec-use-by-compute,n,z

Addressed by: https://review.openstack.org/469037
    _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: https://review.openstack.org/499799
    Modernize set_vm_state_and_notify

Addressed by: https://review.openstack.org/499878
    Remove dest node allocation if evacuate MoveClaim fails

Addressed by: https://review.openstack.org/499678
    Add recreate test for forced host evacuate not setting dest allocations

Addressed by: https://review.openstack.org/499877
    Add a test to make sure failed evacuate cleans up dest allocation

Addressed by: https://review.openstack.org/499874
    Add recreate test for evacuate claim failure

Addressed by: https://review.openstack.org/499399
    Create allocations against forced dest host during evacuate

Addressed by: https://review.openstack.org/499718
    Refactor out claim_resources_on_destination into a utility

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

Addressed by: https://review.openstack.org/503159
    Add recreate test for forced host evacuate not setting dest allocations

Addressed by: https://review.openstack.org/515461
    Use the RequestSpec when getting scheduler_hints in compute

Addressed by: https://review.openstack.org/515495
    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: https://review.openstack.org/581813
    Add nova-status upgrade check for request spec migrations

Addressed by: https://review.openstack.org/582417
    Pass request_spec from compute to cell conductor on reschedule

Addressed by: https://review.openstack.org/614265
    Drop request spec migration code

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

Addressed by: https://review.openstack.org/614309
    Remove legacy request spec compat code from API

Addressed by: https://review.openstack.org/625705
    Remove legacy RequestSpec compat code from live migrate task

Addressed by: https://review.openstack.org/625706
    Remove legacy RequestSpec compat from conductor unshelve_instance

Addressed by: https://review.openstack.org/625707
    Remove legacy RequestSpec compat from conductor rebuild_instance

Gerrit topic: https://review.opendev.org/#/q/topic:bp/request-spec-use-by-compute

Addressed by: https://review.opendev.org/673580
    Remove Request Spec Migration upgrade status check

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.