...
- CopyCommand (from primary1 to secondary)
- skipped.
- check if there are other Command on same volume ?
- CopyCommand (from secondary to primary2)
- 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 is changed on primary2
- if yes, still Copying
- if no, update state
- CopyCommand (from primary1 to primary2)
- check if volume exists on primary1
- check if volume exists on primary2
- check if volume 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 is changed on primary2
- if yes, still Migrating
- if no, update state
3.
...
8 Limitations
- Assumption
- Each request does not have multiple commands with same name
- for example, 700028267079401857-org.apache.cloudstack.storage.command.CopyCommand
- Only support:
- 3 commands
- CopyCommand
- MigrateCommand
- MigrateVolumeCommand
- resources in Migration state (vm, source volume, dest volume)
- skipped if the resource state is not Migrating
- skipped if the source or dest host/pool are inconsistent with command
- Hypervisor: KVM
- Storage: NFS, Local, Powerflex
3.
...
9 To be Discussed (TODO)
- How to distribute the reconciiation tasks if there are multiple management servers ?
- now: Reconciliation is processed by first management server
- How to better handle the state DANGLED_IN_BACKEND ?
- now: no special action
- How to better handle the state COMPLETED and FAILED ? Do not reconcile via hosts if state_by_agent to COMPLETED ?
- now: no special action
4. Test cases
4.1 Backend commands of some migration
...
{"serverDuration": 121, "requestCorrelationId": "939546d438092b10"}