Skip to content

Commit 0561110

Browse files
awelskubevirt-bot
authored and
kubevirt-bot
committed
Go to completed phase after apply delta on warm import
Instead of going to resize phase, go directly to completed phase for apply the delta snapshot. Resizing has already happened when importing the initial snapshot. This will cause validation of the size to not happen every single delta. Since the resize steps validates the available space on the target. This was causing issues on filesystem volumes where the space was being used and the available space is less than the virtual size of the disk. We don't care about the available space at this point since we already verified there was enough space on the initial snapshot import. Signed-off-by: Alexander Wels <awels@redhat.com>
1 parent 6847b98 commit 0561110

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pkg/importer/vddk-datasource_amd64.go

+5
Original file line numberDiff line numberDiff line change
@@ -1064,5 +1064,10 @@ func (vs *VDDKDataSource) TransferFile(fileName string) (ProcessingPhase, error)
10641064
}
10651065
}
10661066

1067+
if vs.PreviousSnapshot != "" {
1068+
// Don't resize when applying snapshot deltas as the resize has already happened
1069+
// when the first snapshot was imported.
1070+
return ProcessingPhaseComplete, nil
1071+
}
10671072
return ProcessingPhaseResize, nil
10681073
}

pkg/importer/vddk-datasource_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ var _ = Describe("VDDK data source", func() {
217217

218218
phase, err = snap2.TransferFile(".")
219219
Expect(err).ToNot(HaveOccurred())
220-
Expect(phase).To(Equal(ProcessingPhaseResize))
220+
Expect(phase).To(Equal(ProcessingPhaseComplete))
221221

222222
deltaSum := md5.Sum(mockSinkBuffer)
223223
Expect(changedSourceSum).To(Equal(deltaSum))

0 commit comments

Comments
 (0)