ScaleComputing / HyperCoreAnsibleCollection

Official Ansible collection for Scale Computing SC//HyperCore (HC3) v1 API
GNU General Public License v3.0
12 stars 8 forks source link

track VM replication progress #9

Open justinc1 opened 2 years ago

justinc1 commented 2 years ago

As a user, I configure VM replication. Then I expect I can recover VM from replica.

In reality, HC3 can take a long time (minutes) before 1st snapshot is fully replicated. Enhancement: snapshot_info or some similar module should be able to report actual replication progres - maybe:

justinc1 commented 1 year ago

In https://github.com/ScaleComputing/HyperCoreAnsibleCollection/pull/220 also suggests "vm_snapshot_info could include into output also unavailable attribute".

ddemlow commented 1 year ago

hypercore 9.2.18 and higher now includes a percentComplete (and also block level sent total to send) in /rest/v1/VirDomainReplication ... (might need some research / testing to see what this would reflect if there is more than one source snapshot waiting to be transmitted to target @TomboScaleComputing ?)

  },
  "blockCountDiff": 19870,
  "blockCountSent": 1070,
  "percentComplete": 5
}
TomboScaleComputing commented 1 year ago

hypercore 9.2.18 and higher now includes a percentComplete (and also block level sent total to send) in /rest/v1/VirDomainReplication ... (might need some research / testing to see what this would reflect if there is more than one source snapshot waiting to be transmitted to target @TomboScaleComputing ?)

  },
  "blockCountDiff": 19870,
  "blockCountSent": 1070,
  "percentComplete": 5
}

Apologies for the slow response -- this has been in the product for some time, but as of recent 9.2.x versions, we now include the information related to the initial clone snapshot in the calculation, if the VM replicating was cloned.

The associated snapshot serial numbers are also stored in the progress struct: VirDomainReplicationProgress->snapshotFrom->domain->snapshotSerialNumber and VirDomainReplicationProgress->snapshotTo->domain->snapshotSerialNumber

Replication will be caught up when the snapshotFrom serial number equals the snapshotTo serial (and it is the last snapshot in the VM's list to be replicated).