Fix volume copy logic

Bug #1890979 reported by haixin on 2020-08-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
High
haixin

Bug Description

when we migration, retype or backup an volume, it need to call _transfer_data function in volume_utils.py, especially in the RBD volume that we use a lot.

   if the volume is thin volume, and the file in the volume is sparse file, this means it may not the end of file when we read b'',if we break here will lead to Incomplete file,This is a serious situation for mirror image。
   so we should not break, we should continue and seek the offset of dest. in order to get the full data of src volume.

haixin (haixin77) on 2020-08-10
Changed in cinder:
assignee: nobody → haixin (haixin77)
haixin (haixin77) on 2020-08-10
description: updated

Fix proposed to branch: master
Review: https://review.opendev.org/745485

Changed in cinder:
status: New → In Progress
Eric Harney (eharney) on 2020-08-10
Changed in cinder:
importance: Undecided → High
haixin (haixin77) on 2020-08-11
summary: - Optimize volume copy logic
+ Fix volume copy logic
Gorka Eguileor (gorka) wrote :

Haixin, could you provide a way to reproduce this issue and confirm that it's actually happening?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers