From 49422f87d20edd2dd9f4eccb4447fb8cd4671e1c Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Fri, 22 Nov 2019 14:48:30 -0500 Subject: [PATCH] Add sequence diagrams to resize/cold migrate contrib doc This adds high level sequence diagrams for the resize flows including confirm and revert. Change-Id: Iaca4325c9b4d7b63c5bc811bdba2db0d10db61f6 --- .../contributor/resize-and-cold-migrate.rst | 68 ++++++++++++++++++- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/doc/source/contributor/resize-and-cold-migrate.rst b/doc/source/contributor/resize-and-cold-migrate.rst index b2b267cae9ce..45c5fb792a67 100644 --- a/doc/source/contributor/resize-and-cold-migrate.rst +++ b/doc/source/contributor/resize-and-cold-migrate.rst @@ -109,10 +109,71 @@ Summary of differences - No - Yes (microversion >= 2.56) -Sequence Diagram -~~~~~~~~~~~~~~~~ +Sequence Diagrams +~~~~~~~~~~~~~~~~~ -.. todo:: Add something like the :doc:`/reference/live-migration` diagram. +The following diagrams are current as of the 21.0.0 (Ussuri) release. + +Resize +------ + +This is the sequence of calls to get the server to ``VERIFY_RESIZE`` status. + +.. seqdiag:: + + seqdiag { + API; Conductor; Scheduler; Source; Destination; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API -> Conductor [label = "cast", note = "resize_instance/migrate_server"]; + Conductor => Scheduler [label = "call", note = "select_destinations"]; + Conductor -> Destination [label = "cast", note = "prep_resize"]; + Source <- Destination [label = "cast", leftnote = "resize_instance"]; + Source -> Destination [label = "cast", note = "finish_resize"]; + } + +Confirm resize +-------------- + +This is the sequence of calls when confirming `or deleting`_ a server in +``VERIFY_RESIZE`` status. + +Note that in the below diagram, if confirming a resize while deleting a server +the API synchronously calls the source compute service. + +.. seqdiag:: + + seqdiag { + API; Source; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API -> Source [label = "cast (or call if deleting)", note = "confirm_resize"]; + } + +Revert resize +------------- + +This is the sequence of calls when reverting a server in ``VERIFY_RESIZE`` +status. + +.. seqdiag:: + + seqdiag { + API; Source; Destination; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API -> Destination [label = "cast", note = "revert_resize"]; + Source <- Destination [label = "cast", leftnote = "finish_revert_resize"]; + } .. _resize API: https://docs.openstack.org/api-ref/compute/#resize-server-resize-action .. _cold migrate API: https://docs.openstack.org/api-ref/compute/#migrate-server-migrate-action @@ -129,3 +190,4 @@ Sequence Diagram .. _migration-based allocations: https://specs.openstack.org/openstack/nova-specs/specs/queens/implemented/migration-allocations.html .. _dropped: https://opendev.org/openstack/nova/src/tag/19.0.0/nova/compute/manager.py#L4048 .. _reverted: https://opendev.org/openstack/nova/src/tag/19.0.0/nova/compute/manager.py#L4233 +.. _or deleting: https://opendev.org/openstack/nova/src/tag/19.0.0/nova/compute/api.py#L2135