Skip to content

Commit 363723f

Browse files
committed
fix snapshot name when creating an S3 backup
When an S3 backup gets created, we forgot to set the "Type" to S3 in one case. This then lead to issues when using "delete-local" snapshot parameter, as then the default "InCluster://" based url obviously did not work. Signed-off-by: Moritz Wanzenböck <moritz.wanzenboeck@linbit.com>
1 parent 2876509 commit 363723f

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
### Fixed
1414

1515
- Only delete local snapshot of backup when `delete-local` parameter is set.
16+
- Fixed volume snapshot handle using the wrong format for S3 remotes when `delete-local` is set.
1617

1718
## [1.10.3] - 2025-11-26
1819

examples/k8s/volume-snapshot.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ kind: VolumeSnapshot
33
metadata:
44
name: linstor-snapshot-test
55
spec:
6-
snapshotClassName: linstor-csi-snapshot-class
6+
volumeSnapshotClassName: linstor-csi-snapshot-class
77
source:
8-
name: linstor-pvc-test
9-
kind: PersistentVolumeClaim
8+
persistentVolumeClaimName: linstor-pvc-test

pkg/client/linstor.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,11 @@ func (s *Linstor) SnapCreate(ctx context.Context, id string, params *volume.Snap
942942

943943
for i := range lsnaps {
944944
s, err := linstorSnapshotToCSI(&lsnaps[i])
945+
946+
if s != nil {
947+
s.Type = params.Type
948+
}
949+
945950
result = append(result, s)
946951
errs = append(errs, err)
947952
}

0 commit comments

Comments
 (0)