Fix resource tracking for operations that move instances between hosts

Registered by Nikola Đipanov on 2015-06-19

Resource tracking for operations that move instances between compute hosts is
broken in Nova. The fix requires some refactoring and tweaking of the data
model so it's discussed in a spec. It's really about fixing of several long
standing bugs.

Blueprint information

Status:
Complete
Approver:
John Garbutt
Priority:
Medium
Drafter:
Nikola Đipanov
Direction:
Approved
Assignee:
Nikola Đipanov
Definition:
Approved
Series goal:
Accepted for liberty
Implementation:
Implemented
Milestone target:
milestone icon 12.0.0
Started by
John Garbutt on 2015-07-01
Completed by
John Garbutt on 2015-09-04

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/migration-fix-resource-tracking,n,z

Addressed by: https://review.openstack.org/193576
    Fix resource tracking for operations that move instances between hosts

Addressed by: https://review.openstack.org/197137
    compute: rename ResizeClaim to MoveClaim

Addressed by: https://review.openstack.org/197138
    rt: generalize claim code tobe useful for other move actions

Addressed by: https://review.openstack.org/197525
    tests: move a test to the proper class in test_resource_tracker

Addressed by: https://review.openstack.org/197526
    tests: Move test_resource_tracker to Instance objects

Addressed by: https://review.openstack.org/197668
    Introduce a simple state machine module

Addressed by: https://review.openstack.org/197669
    Define migration states and transitions and use when changing status

Addressed by: https://review.openstack.org/199678
    rt: move filtering of mygration by type lower in the call stack

Addressed by: https://review.openstack.org/199679
    Allow for migration object to be passed to _move_claim

Addressed by: https://review.openstack.org/200485
    compute: Make rebuild_instance RPC take an optional migration

Addressed by: https://review.openstack.org/213461
    compute: Split the rebuild_instance method

Addressed by: https://review.openstack.org/214713
    compute: Make rebuild consider the node that was passed in

Addressed by: https://review.openstack.org/214770
    Make rebuild/evacuate use resource claims

Addressed by: https://review.openstack.org/216731
    db: Add the migration_context to the instance_extra table

Addressed by: https://review.openstack.org/216732
    objects: Add MigrationContext object

Addressed by: https://review.openstack.org/216733
    objects: Hook migration object into Instance

Addressed by: https://review.openstack.org/218201
    tests: Make test_claims use Instance object

Addressed by: https://review.openstack.org/218385
    Claims: Make sure move claims crate a migration context records

Addressed by: https://review.openstack.org/218500
    compute: migrate/resize paths properly handle stashed numa_topology

Addressed by: https://review.openstack.org/218938
    RT: Migration resource tracking uses migration context

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

This is the last patch we need to get merged for liberty:
https://review.openstack.org/#/c/216733

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.