From d752973eb6ad9492a7165f4f3b0c48ce18485672 Mon Sep 17 00:00:00 2001 From: hlts2 Date: Mon, 25 Nov 2024 17:42:24 +0900 Subject: [PATCH] fix: tweak Signed-off-by: hlts2 --- pkg/driver/controller_server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/driver/controller_server.go b/pkg/driver/controller_server.go index 3d6fb52..3d6375a 100644 --- a/pkg/driver/controller_server.go +++ b/pkg/driver/controller_server.go @@ -605,9 +605,9 @@ func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequ Str("snapshot_id", snapshotID). Msg("Deleting snapshot in Civo API") - // _, err := d.CivoClient.DeleteSnapshot(req.GetSnapshotId()) + // _, err := d.CivoClient.DeleteVolumeSnapshot(snapshotID) // if err != nil { - // if strings.Contains(err.Error(), "") { + // if strings.Contains(err.Error(), "DatabaseVolumeSnapshotNotFoundError") { // log.Info(). // Str("volume_id", snapshotID). // Msg("Snapshot already deleted from Civo API") @@ -615,7 +615,8 @@ func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequ // } // return nil, status.Errorf(codes.Internal, "failed to delete snapshot %q, err: %s", snapshotID, err) // } - return &csi.DeleteSnapshotResponse{}, nil + // return &csi.DeleteSnapshotResponse{}, nil + return nil, status.Error(codes.Unimplemented, "") } // ListSnapshots is part of implementing Snapshot & Restore functionality, but we don't support that