Skip to content

Commit

Permalink
fix(snapshot): update snapshot delete logs (#92)
Browse files Browse the repository at this point in the history
Signed-off-by: prateekpandey14 <[email protected]>
  • Loading branch information
prateekpandey14 committed Jun 9, 2020
1 parent d6779c2 commit ef6b0e5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,19 +265,20 @@ 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",
)
}
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(),
)
Expand Down

0 comments on commit ef6b0e5

Please sign in to comment.