Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

            -> RECONCILED (all good) / RECONCILE_FAILED (failed, will retry) / RECONCILED_RETRY (success, but need more information, will retry)

Migrate VM

  • None


Migrate VM with volumes

  • If VM is

...

  • Running state and volume is Migrating state
  • check via

...

  • host (if source is Up)

...

  • determine the state and update
    • if Running on dest, Running
    • If Paused on dest, Migrating

...

  • Update volume state
      • if source volume is found but destination is not found, mark source as Ready and dest as Destroy
      • if source volume is not found but destination is  found, mark source as Destroy and dest as Ready

Migrate VM with volumes  (If VM is Migrating)

  • check VM state and volume states
  • Check if there are reconcile commands for the VM
  • If no, check the state on source host (last_host_id) and destination host (host_id)
  • PrepareForMigrationCommand (Update VM state)
  • MigrateCommand
  • check via source host (if source is Up)
  • check via destination host (if dest is Up)
  • determine the state and update


Migrate Volumes  (If volume is Migrating)

  • CopyCommand (from primary1 to secondary)
    • skipped.
    • change state from Creating to Destroy
    • clean volume_store_refcheck if there are other Command on same volume ?
  • CopyCommand (from secondary to primary2)
    • find an endpoint 
    • check if volume exists on primary2 (via the host, other host on same cluster or pod or zone, depends on the scope of storage, or cluster of host)
    • check if volume size is changed on primary2
      • if yes, still Copying
      • if no, update statestate from Creating to Destroy, and clean volume_store_ref
  • CopyCommand (from primary1 to primary2)
    • check if volume exists on primary1
    • check if volume exists on primary2
    • check if volume size is changed on primary2
      • if yes, still Copying
      • if no, update state
  • MigrateVolumeCommand (from primary1 to primary2)
    • check if volume exists on primary1
    • check if volume exists on primary2
    • check if volume size is changed on primary2
      • if yes, still Migrating
      • if no, update state

...