Skip to content

Commit 72f2697

Browse files
committed
Return success on PD not found
1 parent 6f3e28b commit 72f2697

File tree

2 files changed

+275
-250
lines changed

2 files changed

+275
-250
lines changed

pkg/gce-pd-csi-driver/controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,8 @@ func (gceCS *GCEControllerServer) executeControllerUnpublishVolume(ctx context.C
593593
project, volKey, err = gceCS.CloudProvider.RepairUnderspecifiedVolumeKey(ctx, project, volKey)
594594
if err != nil {
595595
if gce.IsGCENotFoundError(err) {
596-
return nil, status.Errorf(codes.NotFound, "ControllerUnpublishVolume could not find volume with ID %v: %v", volumeID, err.Error())
596+
klog.Warningf("Treating volume %v as unpublished because it could not be found", volumeID)
597+
return &csi.ControllerUnpublishVolumeResponse{}, nil
597598
}
598599
return nil, LoggedError("ControllerUnpublishVolume error repairing underspecified volume key: ", err)
599600
}

0 commit comments

Comments
 (0)