From ef6b0e58f491ce47b5648d43282376ac8c7e6198 Mon Sep 17 00:00:00 2001 From: Prateek Pandey Date: Tue, 9 Jun 2020 17:23:03 +0530 Subject: [PATCH] fix(snapshot): update snapshot delete logs (#92) Signed-off-by: prateekpandey14 --- pkg/driver/controller.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/driver/controller.go b/pkg/driver/controller.go index 8e785e7db..50780d893 100644 --- a/pkg/driver/controller.go +++ b/pkg/driver/controller.go @@ -265,11 +265,12 @@ func (cs *controller) DeleteSnapshot( ctx context.Context, req *csi.DeleteSnapshotRequest, ) (*csi.DeleteSnapshotResponse, error) { + snapshotID := strings.Split(req.SnapshotId, "@") if len(snapshotID) != 2 { return nil, status.Errorf( codes.Internal, - "failed to handle CreateSnapshotRequest for %s, {%s}", + "failed to handle DeleteSnapshotRequest for %s, {%s}", req.SnapshotId, "Manual intervention required", ) @@ -277,7 +278,7 @@ func (cs *controller) DeleteSnapshot( if err := utils.DeleteSnapshot(snapshotID[0], snapshotID[1]); err != nil { return nil, status.Errorf( codes.Internal, - "failed to handle CreateSnapshotRequest for %s, {%s}", + "failed to handle DeleteSnapshotRequest for %s, {%s}", req.SnapshotId, err.Error(), )