Skip to content

Commit

Permalink
Merge branch 'release-1.14' into update-release-note-1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
blackpiglet committed Jun 12, 2024
2 parents a650059 + bf778c7 commit 08fea6e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions internal/volume/volumes_information.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,16 +769,24 @@ func (t *RestoreVolumeInfoTracker) Result() []*RestoreVolumeInfo {
continue
}
pvcNS, pvcName := n[0], n[1]
var restoreSize int64 = 0
if csiSnapshot.Status != nil && csiSnapshot.Status.RestoreSize != nil {
restoreSize = csiSnapshot.Status.RestoreSize.Value()
}
vscName := ""
if csiSnapshot.Spec.Source.VolumeSnapshotContentName != nil {
vscName = *csiSnapshot.Spec.Source.VolumeSnapshotContentName
}
volumeInfo := &RestoreVolumeInfo{
PVCNamespace: pvcNS,
PVCName: pvcName,
SnapshotDataMoved: false,
RestoreMethod: CSISnapshot,
CSISnapshotInfo: &CSISnapshotInfo{
SnapshotHandle: csiSnapshot.Annotations[VolumeSnapshotHandleAnnotation],
Size: csiSnapshot.Status.RestoreSize.Value(),
Size: restoreSize,
Driver: csiSnapshot.Annotations[CSIDriverNameAnnotation],
VSCName: *csiSnapshot.Spec.Source.VolumeSnapshotContentName,
VSCName: vscName,
},
}
if pvcPVInfo := t.pvPvc.retrieve("", pvcName, pvcNS); pvcPVInfo != nil {
Expand Down

0 comments on commit 08fea6e

Please sign in to comment.