Add post-transfer disk checksum verification#406
Open
claudiubelu wants to merge 1 commit intocloudbase:masterfrom
Open
Add post-transfer disk checksum verification#406claudiubelu wants to merge 1 commit intocloudbase:masterfrom
claudiubelu wants to merge 1 commit intocloudbase:masterfrom
Conversation
80008c7 to
17170a5
Compare
Dany9966
requested changes
Apr 7, 2026
coriolis/providers/backup_writers.py
Outdated
Comment on lines
+763
to
+765
| "start_offset": 0, | ||
| "end_offset": 0, | ||
| "checksum_algorithm": algorithm, |
Contributor
There was a problem hiding this comment.
start_offset/end_offset should also be configurable. Default to 0.
There are cases where we add a 1GB extra padding to destination disks, in that case we'll need to specifically pass in an end_offset, so that the destination hasher stops there. The padding was added because in some cases, the source provider can't accurately report the exact size of the source disks (i.e. the in-guest disk is larger than what the platform reports by a small amount).
37db355 to
e14d59a
Compare
After each disk is written, compare the source (replicator) and
destination (writer) checksums to catch any data corruption during
transfer. The comparison happens while the writer device is still
acquired so the checksum job can run.
- Client.get_disk_checksum: calls GET /api/v1/dev/{disk}/checksum
- HTTPBackupWriterImpl:
- _create_checksum_job: calls POST /api/v2/device/{disk}/checksumJob
- _delete_checksum_job: calls DELETE /api/v2/device/{disk}/checksumJob/{id}
- _get_checksum_job_status: calls GET /api/v2/device/{disk}/checksumJob/{id}
- get_disk_checksum: creates checksum job, waits for it to finish, and
returns the checksum value and algorithm.
- Replicator._verify_disk_checksum: compares both sides, raises on
algorithm or value mismatch.
e14d59a to
8bedf10
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After each disk is written, compare the source (replicator) and destination (writer) checksums to catch any data corruption during transfer. The comparison happens while the writer device is still acquired so the checksum job can run.
Client.get_disk_checksum: calls GET/api/v1/dev/{disk}/checksumHTTPBackupWriterImpl:_create_checksum_job: calls POST/api/v2/device/{disk}/checksumJob_delete_checksum_job: calls DELETE/api/v2/device/{disk}/checksumJob/{id}-
_get_checksum_job_status: calls GET/api/v2/device/{disk}/checksumJob/{id}get_disk_checksum: creates checksum job, waits for it to finish, and returns the checksum value and algorithm.Replicator._verify_disk_checksum: compares both sides, raises on algorithm or value mismatch.