diff --git a/doc/source/reference/attach_volume.diag b/doc/source/_static/images/attach_volume.dia similarity index 100% rename from doc/source/reference/attach_volume.diag rename to doc/source/_static/images/attach_volume.dia diff --git a/doc/source/_static/images/attach_volume.svg b/doc/source/_static/images/attach_volume.svg new file mode 100644 index 000000000000..362b65745b54 --- /dev/null +++ b/doc/source/_static/images/attach_volume.svg @@ -0,0 +1,169 @@ + + + + + + + + + blockdiag + seqdiag { + user; nova-api; nova-conductor; nova-compute; libvirt-driver; os-brick; cinder-api; + edge_length = 300; + span_height = 16; + activation = none; + default_note_color = white; + user -> nova-api [label = "POST /servers/{server_id}/os-volume_attachments"]; + nova-api -> nova-compute [label = "RPC call reserve_block_device_name"]; + nova-compute -> nova-compute [label = "instance.uuid lock"]; + nova-compute ->> nova-conductor [label = "bdm.create"]; + nova-compute <<- nova-conductor [label = "return BlockDeviceMapping"]; + nova-compute -> libvirt-driver [label = "get_device_name_for_instance"]; + nova-compute <- libvirt-driver [label = "Return get_device_name_for_instance"]; + nova-api <- nova-compute [label = "Return reserve_block_device_name"]; + nova-api -> cinder-api [label = "POST /v3/{project_id}/attachments"]; + nova-api <- cinder-api [label = "Return HTTP 200 (without connection_info)"]; + nova-api ->> nova-compute [label = "RPC cast attach_volume"]; + user <- nova-api [label = "Return HTTP 200 (includes device_name)"]; + nova-compute -> nova-compute [label = "instance.uuid lock"]; + nova-compute -> os-brick [label = "cinder_backend.uuid lock"]; + nova-compute -> cinder-api [label = "PUT /v3/{project_id}/attachments/{attachment_id}"]; + nova-compute <- cinder-api [label = "Return HTTP 200 (includes connection_info)"]; + nova-compute -> libvirt-driver [label = "attach_volume"]; + libvirt-driver -> os-brick [label = "connect_volume"]; + os-brick -> os-brick [label = "connect_volume lock"]; + libvirt-driver <- os-brick; + libvirt-driver -> libvirt-driver [label = "guest.attach_device"]; + libvirt-driver -> libvirt-driver [label = "_build_device_metadata"]; + libvirt-driver ->> nova-conductor [label = "instance.save"]; + nova-compute <- libvirt-driver [label = "Return attach_volume"]; + nova-compute ->> nova-conductor [label = "bdm.save"]; + nova-compute -> cinder-api [label = "POST /v3/{project_id}/attachments/{attachment_id}/action (os-complete)"]; + nova-compute <- cinder-api [label = "Return HTTP 200"]; +} + + + + + + + + + + + + + + + + + user + + nova-api + + nova-conductor + + nova-compute + + libvirt-driver + + os-brick + + cinder-api + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + POST /servers/{server_id}/os-volume_attachment + s + RPC call reserve_block_device_name + instance.uuid lock + bdm.create + return BlockDeviceMapping + get_device_name_for_instance + Return get_device_name_for_instance + Return reserve_block_device_name + POST /v3/{project_id}/attachments + Return HTTP 200 (without connection_info) + RPC cast attach_volume + Return HTTP 200 (includes device_name) + instance.uuid lock + cinder_backend.uuid lock + PUT /v3/{project_id}/attachments/{attachment_id} + Return HTTP 200 (includes connection_info) + attach_volume + connect_volume + connect_volume lock + guest.attach_device + _build_device_metadata + instance.save + Return attach_volume + bdm.save + POST /v3/{project_id}/attachments/{attachment_id}/action (os-complete) + Return HTTP 200 + diff --git a/doc/source/_static/images/live-migration.dia b/doc/source/_static/images/live-migration.dia new file mode 100644 index 000000000000..56f88d92634a --- /dev/null +++ b/doc/source/_static/images/live-migration.dia @@ -0,0 +1,29 @@ +seqdiag { + Conductor; Source; Destination; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + Conductor -> Destination [label = "call", note = "check_can_live_migrate_destination"]; + Source <- Destination [label = "call", leftnote = "check_can_live_migrate_source"]; + Source --> Destination; + Conductor <-- Destination; + + Conductor ->> Source [label = "cast", note = "live_migrate"]; + Source -> Destination [label = "call", note = "pre_live_migration (set up dest)"]; + Source <-- Destination; + + === driver.live_migration (success) === + + Source -> Source [leftnote = "post_live_migration (clean up source)"]; + Source -> Destination [label = "call", note = "post_live_migration_at_destination (finish dest)"]; + Source <-- Destination; + + === driver.live_migration (failure) === + + Source -> Source [leftnote = "_rollback_live_migration"]; + Source -> Destination [label = "call", note = "remove_volume_connections"]; + Source <-- Destination; + Source ->> Destination [label = "cast", note = "rollback_live_migration_at_destination"]; +} \ No newline at end of file diff --git a/doc/source/_static/images/live-migration.svg b/doc/source/_static/images/live-migration.svg new file mode 100644 index 000000000000..4c26a7f3ae7a --- /dev/null +++ b/doc/source/_static/images/live-migration.svg @@ -0,0 +1,149 @@ + + + + + + + + + blockdiag + seqdiag { + Conductor; Source; Destination; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + Conductor -> Destination [label = "call", note = "check_can_live_migrate_destination"]; + Source <- Destination [label = "call", leftnote = "check_can_live_migrate_source"]; + Source --> Destination; + Conductor <-- Destination; + + Conductor ->> Source [label = "cast", note = "live_migrate"]; + Source -> Destination [label = "call", note = "pre_live_migration (set up dest)"]; + Source <-- Destination; + + === driver.live_migration (success) === + + Source -> Source [leftnote = "post_live_migration (clean up source)"]; + Source -> Destination [label = "call", note = "post_live_migration_at_destination (finish dest)"]; + Source <-- Destination; + + === driver.live_migration (failure) === + + Source -> Source [leftnote = "_rollback_live_migration"]; + Source -> Destination [label = "call", note = "remove_volume_connections"]; + Source <-- Destination; + Source ->> Destination [label = "cast", note = "rollback_live_migration_at_destination"]; +} + + + + + + + + + + + + + + + + + Conductor + + Source + + Destination + + + + + + check_can_live_migrate_destination + + + + + + check_can_live_migrate_source + + + + + + + + + + + live_migrate + + + + + + pre_live_migration (set up dest) + + + + + + + + + + post_live_migration (clean up source) + + + + + + post_live_migration_at_destination (finish dest) + + + + + + + + + + _rollback_live_migration + + + + + + remove_volume_connections + + + + + + + + + rollback_live_migration_at_destination + call + call + cast + call + call + call + cast + + + + + + driver.live_migration (success) + + + + + + driver.live_migration (failure) + diff --git a/doc/source/_static/images/resize/cross-cell/resize.dia b/doc/source/_static/images/resize/cross-cell/resize.dia new file mode 100644 index 000000000000..e99547659124 --- /dev/null +++ b/doc/source/_static/images/resize/cross-cell/resize.dia @@ -0,0 +1,15 @@ +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 = "MigrationTask", note = "select_destinations"]; + Conductor -> Conductor [label = "TargetDBSetupTask"]; + Conductor => Destination [label = "PrepResizeAtDestTask", note = "prep_snapshot_based_resize_at_dest"]; + Conductor => Source [label = "PrepResizeAtSourceTask", note = "prep_snapshot_based_resize_at_source"]; + Conductor => Destination [label = "FinishResizeAtDestTask", note = "finish_snapshot_based_resize_at_dest"]; + Conductor -> Conductor [label = "FinishResizeAtDestTask", note = "update instance mapping"]; +} \ No newline at end of file diff --git a/doc/source/_static/images/resize/cross-cell/resize.svg b/doc/source/_static/images/resize/cross-cell/resize.svg new file mode 100644 index 000000000000..eb6d01d913bb --- /dev/null +++ b/doc/source/_static/images/resize/cross-cell/resize.svg @@ -0,0 +1,109 @@ + + + + + + + + + blockdiag + 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 = "MigrationTask", note = "select_destinations"]; + Conductor -> Conductor [label = "TargetDBSetupTask"]; + Conductor => Destination [label = "PrepResizeAtDestTask", note = "prep_snapshot_based_resize_at_dest"]; + Conductor => Source [label = "PrepResizeAtSourceTask", note = "prep_snapshot_based_resize_at_source"]; + Conductor => Destination [label = "FinishResizeAtDestTask", note = "finish_snapshot_based_resize_at_dest"]; + Conductor -> Conductor [label = "FinishResizeAtDestTask", note = "update instance mapping"]; +} + + + + + + + + + + + + + + + + + + API + + Conductor + + Scheduler + + Source + + Destination + + + + + + + resize_instance/migrate_server + + + + + + select_destinations + + + + + + + + + + + + prep_snapshot_based_resize_at_dest + + + + + + + + prep_snapshot_based_resize_at_source + + + + + + + + finish_snapshot_based_resize_at_dest + + + + + + + + + + update instance mapping + cast + MigrationTask + TargetDBSetupTask + PrepResizeAtDestTask + PrepResizeAtSourceTask + FinishResizeAtDestTask + FinishResizeAtDestTask + diff --git a/doc/source/_static/images/resize/cross-cell/resize_confirm.dia b/doc/source/_static/images/resize/cross-cell/resize_confirm.dia new file mode 100644 index 000000000000..9cf2a6cfae10 --- /dev/null +++ b/doc/source/_static/images/resize/cross-cell/resize_confirm.dia @@ -0,0 +1,17 @@ +seqdiag { + API; Conductor; Source; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API ->> Conductor [label = "cast (or call if deleting)", note = "confirm_snapshot_based_resize"]; + + // separator to indicate everything after this is driven by ConfirmResizeTask + === ConfirmResizeTask === + + Conductor => Source [label = "call", note = "confirm_snapshot_based_resize_at_source"]; + Conductor -> Conductor [note = "hard delete source cell instance"]; + Conductor -> Conductor [note = "update target cell instance status"]; + +} \ No newline at end of file diff --git a/doc/source/_static/images/resize/cross-cell/resize_confirm.svg b/doc/source/_static/images/resize/cross-cell/resize_confirm.svg new file mode 100644 index 000000000000..bc213a0b17f7 --- /dev/null +++ b/doc/source/_static/images/resize/cross-cell/resize_confirm.svg @@ -0,0 +1,82 @@ + + + + + + + + + blockdiag + seqdiag { + API; Conductor; Source; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API ->> Conductor [label = "cast (or call if deleting)", note = "confirm_snapshot_based_resize"]; + + // separator to indicate everything after this is driven by ConfirmResizeTask + === ConfirmResizeTask === + + Conductor => Source [label = "call", note = "confirm_snapshot_based_resize_at_source"]; + Conductor -> Conductor [note = "hard delete source cell instance"]; + Conductor -> Conductor [note = "update target cell instance status"]; + +} + + + + + + + + + + + + API + + Conductor + + Source + + + + + + + confirm_snapshot_based_resize + + + + + + confirm_snapshot_based_resize_at_source + + + + + + + + + + hard delete source cell instance + + + + + + + + update target cell instance status + cast (or call if deleting) + call + + + + + + ConfirmResizeTask + diff --git a/doc/source/_static/images/resize/cross-cell/resize_revert.dia b/doc/source/_static/images/resize/cross-cell/resize_revert.dia new file mode 100644 index 000000000000..c457a2f2ce1e --- /dev/null +++ b/doc/source/_static/images/resize/cross-cell/resize_revert.dia @@ -0,0 +1,19 @@ +seqdiag { + API; Conductor; Source; Destination; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API ->> Conductor [label = "cast", note = "revert_snapshot_based_resize"]; + + // separator to indicate everything after this is driven by RevertResizeTask + === RevertResizeTask === + + Conductor -> Conductor [note = "update records from target to source cell"]; + Conductor -> Conductor [note = "update instance mapping"]; + Conductor => Destination [label = "call", note = "revert_snapshot_based_resize_at_dest"]; + Conductor -> Conductor [note = "hard delete target cell instance"]; + Conductor => Source [label = "call", note = "finish_revert_snapshot_based_resize_at_source"]; + +} \ No newline at end of file diff --git a/doc/source/_static/images/resize/cross-cell/resize_revert.svg b/doc/source/_static/images/resize/cross-cell/resize_revert.svg new file mode 100644 index 000000000000..30e3b129ac37 --- /dev/null +++ b/doc/source/_static/images/resize/cross-cell/resize_revert.svg @@ -0,0 +1,107 @@ + + + + + + + + + blockdiag + seqdiag { + API; Conductor; Source; Destination; + edge_length = 300; + span_height = 15; + activation = none; + default_note_color = white; + + API ->> Conductor [label = "cast", note = "revert_snapshot_based_resize"]; + + // separator to indicate everything after this is driven by RevertResizeTask + === RevertResizeTask === + + Conductor -> Conductor [note = "update records from target to source cell"]; + Conductor -> Conductor [note = "update instance mapping"]; + Conductor => Destination [label = "call", note = "revert_snapshot_based_resize_at_dest"]; + Conductor -> Conductor [note = "hard delete target cell instance"]; + Conductor => Source [label = "call", note = "finish_revert_snapshot_based_resize_at_source"]; + +} + + + + + + + + + + + + + + + + API + + Conductor + + Source + + Destination + + + + + + + revert_snapshot_based_resize + + + + + + + + update records from target to source cell + + + + + + + + update instance mapping + + + + + + revert_snapshot_based_resize_at_dest + + + + + + + + + + hard delete target cell instance + + + + + + finish_revert_snapshot_based_resize_at_source + + + cast + call + call + + + + + + RevertResizeTask + diff --git a/doc/source/_static/images/resize/resize.dia b/doc/source/_static/images/resize/resize.dia new file mode 100644 index 000000000000..151fc39ff1b5 --- /dev/null +++ b/doc/source/_static/images/resize/resize.dia @@ -0,0 +1,13 @@ +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"]; +} \ No newline at end of file diff --git a/doc/source/_static/images/resize/resize.svg b/doc/source/_static/images/resize/resize.svg new file mode 100644 index 000000000000..7e5955f33fea --- /dev/null +++ b/doc/source/_static/images/resize/resize.svg @@ -0,0 +1,85 @@ + + + + + + + + + blockdiag + 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"]; +} + + + + + + + + + + + + + + + + + API + + Conductor + + Scheduler + + Source + + Destination + + + + + + resize_instance/migrate_server + + + + + + select_destinations + + + + + + + + prep_resize + + + + + + resize_instance + + + + + + finish_resize + cast + call + cast + cast + cast + diff --git a/doc/source/_static/images/resize/resize_confirm.dia b/doc/source/_static/images/resize/resize_confirm.dia new file mode 100644 index 000000000000..7fd8363de2ea --- /dev/null +++ b/doc/source/_static/images/resize/resize_confirm.dia @@ -0,0 +1,9 @@ +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"]; +} \ No newline at end of file diff --git a/doc/source/_static/images/resize/resize_confirm.svg b/doc/source/_static/images/resize/resize_confirm.svg new file mode 100644 index 000000000000..88c1d75b8b65 --- /dev/null +++ b/doc/source/_static/images/resize/resize_confirm.svg @@ -0,0 +1,35 @@ + + + + + + + + + blockdiag + 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"]; +} + + + + + + + API + + Source + + + + + + confirm_resize + cast (or call if deleting) + diff --git a/doc/source/_static/images/resize/resize_revert.dia b/doc/source/_static/images/resize/resize_revert.dia new file mode 100644 index 000000000000..14ac53d30dbb --- /dev/null +++ b/doc/source/_static/images/resize/resize_revert.dia @@ -0,0 +1,10 @@ +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"]; +} \ No newline at end of file diff --git a/doc/source/_static/images/resize/resize_revert.svg b/doc/source/_static/images/resize/resize_revert.svg new file mode 100644 index 000000000000..03695fedc547 --- /dev/null +++ b/doc/source/_static/images/resize/resize_revert.svg @@ -0,0 +1,48 @@ + + + + + + + + + blockdiag + 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"]; +} + + + + + + + + + + API + + Source + + Destination + + + + + + revert_resize + + + + + + finish_revert_resize + cast + cast + diff --git a/doc/source/_static/images/scheduling.dia b/doc/source/_static/images/scheduling.dia new file mode 100644 index 000000000000..96c89b121b08 --- /dev/null +++ b/doc/source/_static/images/scheduling.dia @@ -0,0 +1,26 @@ +actdiag { + build-spec -> send-spec -> send-reqs -> query -> return-rps -> + create -> filter -> claim -> return-hosts -> send-hosts; + + lane conductor { + label = "Conductor"; + build-spec [label = "Build request spec object", height = 38]; + send-spec [label = "Submit request spec to scheduler", height = 38]; + send-hosts [label = "Submit list of suitable hosts to target cell", height = 51]; + } + + lane scheduler { + label = "Scheduler"; + send-reqs [label = "Submit resource requirements to placement", height = 64]; + create [label = "Create a HostState object for each RP returned from Placement", height = 64]; + filter [label = "Filter and weigh results", height = 38]; + return-hosts [label = "Return a list of selected host & alternates, along with their allocations, to the conductor", height = 89]; + } + + lane placement { + label = "Placement"; + query [label = "Query to determine the RPs representing compute nodes to satisfy requirements", height = 64]; + return-rps [label = "Return list of resource providers and their corresponding allocations to scheduler", height = 89]; + claim [label = "Create allocations against selected compute node", height = 64]; + } +} \ No newline at end of file diff --git a/doc/source/_static/images/scheduling.svg b/doc/source/_static/images/scheduling.svg new file mode 100644 index 000000000000..b08fa36c7c70 --- /dev/null +++ b/doc/source/_static/images/scheduling.svg @@ -0,0 +1,126 @@ + + + + + + + + + blockdiag + actdiag { + build-spec -> send-spec -> send-reqs -> query -> return-rps -> + create -> filter -> claim -> return-hosts -> send-hosts; + + lane conductor { + label = "Conductor"; + build-spec [label = "Build request spec object", height = 38]; + send-spec [label = "Submit request spec to scheduler", height = 38]; + send-hosts [label = "Submit list of suitable hosts to target cell", height = 51]; + } + + lane scheduler { + label = "Scheduler"; + send-reqs [label = "Submit resource requirements to placement", height = 64]; + create [label = "Create a HostState object for each RP returned from Placement", height = 64]; + filter [label = "Filter and weigh results", height = 38]; + return-hosts [label = "Return a list of selected host & alternates, along with their allocations, to the conductor", height = 89]; + } + + lane placement { + label = "Placement"; + query [label = "Query to determine the RPs representing compute nodes to satisfy requirements", height = 64]; + return-rps [label = "Return list of resource providers and their corresponding allocations to scheduler", height = 89]; + claim [label = "Create allocations against selected compute node", height = 64]; + } +} + + + + + + + + + + + + Conductor + + Scheduler + + Placement + + + + + + Build request spec ob + ject + + Submit request spec t + o scheduler + + Submit resource requi + rements to placement + + Query to determine th + e RPs representing co + mpute nodes to satisf + y requirements + + Return list of resour + ce providers and thei + r corresponding alloc + ations to scheduler + + Create a HostState ob + ject for each RP retu + rned from Placement + + Filter and weigh resu + lts + + Create allocations ag + ainst selected comput + e node + + Return a list of sele + cted host & alternate + s, along with their a + llocations, to the co + nductor + + Submit list of suitab + le hosts to target ce + ll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/source/admin/configuration/cross-cell-resize.rst b/doc/source/admin/configuration/cross-cell-resize.rst index 0c34fd13f512..5455233c7d7c 100644 --- a/doc/source/admin/configuration/cross-cell-resize.rst +++ b/doc/source/admin/configuration/cross-cell-resize.rst @@ -166,23 +166,9 @@ Resize This is the sequence of calls to get the server to ``VERIFY_RESIZE`` status. -.. seqdiag:: +.. image:: /_static/images/resize/cross-cell/resize.svg + :alt: Resize standard workflow - 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 = "MigrationTask", note = "select_destinations"]; - Conductor -> Conductor [label = "TargetDBSetupTask"]; - Conductor => Destination [label = "PrepResizeAtDestTask", note = "prep_snapshot_based_resize_at_dest"]; - Conductor => Source [label = "PrepResizeAtSourceTask", note = "prep_snapshot_based_resize_at_source"]; - Conductor => Destination [label = "FinishResizeAtDestTask", note = "finish_snapshot_based_resize_at_dest"]; - Conductor -> Conductor [label = "FinishResizeAtDestTask", note = "update instance mapping"]; - } Confirm resize ~~~~~~~~~~~~~~ @@ -190,25 +176,8 @@ Confirm resize This is the sequence of calls when confirming `or deleting`_ a server in ``VERIFY_RESIZE`` status. -.. seqdiag:: - - seqdiag { - API; Conductor; Source; - edge_length = 300; - span_height = 15; - activation = none; - default_note_color = white; - - API ->> Conductor [label = "cast (or call if deleting)", note = "confirm_snapshot_based_resize"]; - - // separator to indicate everything after this is driven by ConfirmResizeTask - === ConfirmResizeTask === - - Conductor => Source [label = "call", note = "confirm_snapshot_based_resize_at_source"]; - Conductor -> Conductor [note = "hard delete source cell instance"]; - Conductor -> Conductor [note = "update target cell instance status"]; - - } +.. image:: /_static/images/resize/cross-cell/resize_confirm.svg + :alt: Resize confirm workflow .. _or deleting: https://opendev.org/openstack/nova/src/tag/20.0.0/nova/compute/api.py#L2171 @@ -218,28 +187,8 @@ Revert resize This is the sequence of calls when reverting a server in ``VERIFY_RESIZE`` status. -.. seqdiag:: - - seqdiag { - API; Conductor; Source; Destination; - edge_length = 300; - span_height = 15; - activation = none; - default_note_color = white; - - API ->> Conductor [label = "cast", note = "revert_snapshot_based_resize"]; - - // separator to indicate everything after this is driven by RevertResizeTask - === RevertResizeTask === - - Conductor -> Conductor [note = "update records from target to source cell"]; - Conductor -> Conductor [note = "update instance mapping"]; - Conductor => Destination [label = "call", note = "revert_snapshot_based_resize_at_dest"]; - Conductor -> Conductor [note = "hard delete target cell instance"]; - Conductor => Source [label = "call", note = "finish_revert_snapshot_based_resize_at_source"]; - - } - +.. image:: /_static/images/resize/cross-cell/resize_revert.svg + :alt: Resize revert workflow Limitations ----------- diff --git a/doc/source/conf.py b/doc/source/conf.py index edae3254d91c..ad3037256348 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -42,8 +42,6 @@ extensions = [ 'ext.versioned_notifications', 'ext.feature_matrix', 'ext.extra_specs', - 'sphinxcontrib.actdiag', - 'sphinxcontrib.seqdiag', 'sphinxcontrib.rsvgconverter', ] @@ -55,12 +53,6 @@ policy_generator_config_file = [ ('../../etc/nova/nova-policy-generator.conf', '_static/nova'), ] -actdiag_html_image_format = 'SVG' -actdiag_antialias = True - -seqdiag_html_image_format = 'SVG' -seqdiag_antialias = True - todo_include_todos = True # The master toctree document. @@ -204,70 +196,3 @@ openstackdocs_projects = [ # process. As well as being unnecessary and a bad idea, this breaks on # python3.6 (but not python3.7), so don't do that. os.environ['OS_NOVA_DISABLE_EVENTLET_PATCHING'] = '1' - - -def monkey_patch_blockdiag(): - """Monkey patch the blockdiag library. - - The default word wrapping in blockdiag is poor, and breaks on a fixed - text width rather than on word boundaries. There's a patch submitted to - resolve this [1]_ but it's unlikely to merge anytime soon. - - In addition, blockdiag monkey patches a core library function, - ``codecs.getreader`` [2]_, to work around some Python 3 issues. Because - this operates in the same environment as other code that uses this library, - it ends up causing issues elsewhere. We undo these destructive changes - pending a fix. - - TODO: Remove this once blockdiag is bumped to 1.6, which will hopefully - include the fix. - - .. [1] https://bitbucket.org/blockdiag/blockdiag/pull-requests/16/ - .. [2] https://bitbucket.org/blockdiag/blockdiag/src/1.5.3/src/blockdiag/utils/compat.py # noqa - """ - import codecs - from codecs import getreader - - from blockdiag.imagedraw import textfolder - from blockdiag.utils import compat # noqa - - # oh, blockdiag. Let's undo the mess you made. - codecs.getreader = getreader - - def splitlabel(text): - """Split text to lines as generator. - - Every line will be stripped. If text includes characters "\n\n", treat - as line separator. Ignore '\n' to allow line wrapping. - """ - lines = [x.strip() for x in text.splitlines()] - out = [] - - for line in lines: - if line: - out.append(line) - else: - yield ' '.join(out) - out = [] - - yield ' '.join(out) - - def splittext(metrics, text, bound, measure='width'): - folded = [' '] - for word in text.split(): - # Try appending the word to the last line - tryline = ' '.join([folded[-1], word]).strip() - textsize = metrics.textsize(tryline) - if getattr(textsize, measure) > bound: - # Start a new line. Appends `word` even if > bound. - folded.append(word) - else: - folded[-1] = tryline - return folded - - # monkey patch those babies - textfolder.splitlabel = splitlabel - textfolder.splittext = splittext - - -monkey_patch_blockdiag() diff --git a/doc/source/contributor/resize-and-cold-migrate.rst b/doc/source/contributor/resize-and-cold-migrate.rst index b425b37e8633..a46d14112587 100644 --- a/doc/source/contributor/resize-and-cold-migrate.rst +++ b/doc/source/contributor/resize-and-cold-migrate.rst @@ -124,21 +124,8 @@ 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"]; - } +.. image:: /_static/images/resize/resize.svg + :alt: Resize standard workflow Confirm resize -------------- @@ -149,17 +136,8 @@ This is the sequence of calls when confirming `or deleting`_ a server in 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"]; - } +.. image:: /_static/images/resize/resize_confirm.svg + :alt: Resize confirm workflow Revert resize ------------- @@ -167,18 +145,9 @@ Revert resize This is the sequence of calls when reverting a server in ``VERIFY_RESIZE`` status. -.. seqdiag:: +.. image:: /_static/images/resize/resize_revert.svg + :alt: Resize revert workflow - 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 diff --git a/doc/source/reference/attach-volume.rst b/doc/source/reference/attach-volume.rst index c82c035a14a0..8bf24d7fc597 100644 --- a/doc/source/reference/attach-volume.rst +++ b/doc/source/reference/attach-volume.rst @@ -31,4 +31,5 @@ attach volume flow. In this example these include locks against the itself. This final ``connect_volume`` lock also being held when detaching and disconnecting a volume from the host by ``os-brick``. -.. seqdiag:: attach_volume.diag +.. image:: /_static/images/attach_volume.svg + :alt: Attach volume workflow \ No newline at end of file diff --git a/doc/source/reference/live-migration.rst b/doc/source/reference/live-migration.rst index 84447677f387..180870268c85 100644 --- a/doc/source/reference/live-migration.rst +++ b/doc/source/reference/live-migration.rst @@ -15,34 +15,5 @@ Live Migration ================ -.. seqdiag:: - - seqdiag { - Conductor; Source; Destination; - edge_length = 300; - span_height = 15; - activation = none; - default_note_color = white; - - Conductor -> Destination [label = "call", note = "check_can_live_migrate_destination"]; - Source <- Destination [label = "call", leftnote = "check_can_live_migrate_source"]; - Source --> Destination; - Conductor <-- Destination; - - Conductor ->> Source [label = "cast", note = "live_migrate"]; - Source -> Destination [label = "call", note = "pre_live_migration (set up dest)"]; - Source <-- Destination; - - === driver.live_migration (success) === - - Source -> Source [leftnote = "post_live_migration (clean up source)"]; - Source -> Destination [label = "call", note = "post_live_migration_at_destination (finish dest)"]; - Source <-- Destination; - - === driver.live_migration (failure) === - - Source -> Source [leftnote = "_rollback_live_migration"]; - Source -> Destination [label = "call", note = "remove_volume_connections"]; - Source <-- Destination; - Source ->> Destination [label = "cast", note = "rollback_live_migration_at_destination"]; - } +.. image:: /_static/images/live-migration.svg + :alt: Live migration workflow diff --git a/doc/source/reference/scheduling.rst b/doc/source/reference/scheduling.rst index a73710ce7a6d..81e99c17b970 100644 --- a/doc/source/reference/scheduling.rst +++ b/doc/source/reference/scheduling.rst @@ -29,34 +29,8 @@ The scheduling process is described below. alternative hosts passed between the scheduler and conductor(s) is future work. -.. actdiag:: - - actdiag { - build-spec -> send-spec -> send-reqs -> query -> return-rps -> - create -> filter -> claim -> return-hosts -> send-hosts; - - lane conductor { - label = "Conductor"; - build-spec [label = "Build request spec object", height = 38]; - send-spec [label = "Submit request spec to scheduler", height = 38]; - send-hosts [label = "Submit list of suitable hosts to target cell", height = 51]; - } - - lane scheduler { - label = "Scheduler"; - send-reqs [label = "Submit resource requirements to placement", height = 64]; - create [label = "Create a HostState object for each RP returned from Placement", height = 64]; - filter [label = "Filter and weigh results", height = 38]; - return-hosts [label = "Return a list of selected host & alternates, along with their allocations, to the conductor", height = 89]; - } - - lane placement { - label = "Placement"; - query [label = "Query to determine the RPs representing compute nodes to satisfy requirements", height = 64]; - return-rps [label = "Return list of resource providers and their corresponding allocations to scheduler", height = 89]; - claim [label = "Create allocations against selected compute node", height = 64]; - } - } +.. image:: /_static/images/scheduling.svg + :alt: Scheduling workflow As the above diagram illustrates, scheduling works like so: