Merge "Fix type passed to write function during backup restoration"

This commit is contained in:
Zuul
2025-04-08 14:39:16 +00:00
committed by Gerrit Code Review
2 changed files with 6 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ def _write_nonzero(volume_file, volume_offset, content):
# The len(chunk) may be smaller than chunk_length. It's okay.
if not volume_utils.is_all_zero(chunk):
volume_file.seek(volume_offset + chunk_offset)
volume_file.write(chunk)
volume_file.write(chunk.tobytes())
def _write_volume(volume_is_new, volume_file, volume_offset, content):

View File

@@ -0,0 +1,5 @@
---
fixes:
- |
`Bug #2082587 <https://bugs.launchpad.net/cinder/+bug/2082587>` _: Fixed
backup restoration throwing TypeError on new volume.