Skip to content

Commit 27b5124

Browse files
authored
Merge pull request #1109 from artemvmin/artemvmin-unpublish-not-found
Succeed unpublish when a zonal, underspecified PD is not found
2 parents 8ba3fec + c5d57b4 commit 27b5124

File tree

6 files changed

+479
-300
lines changed

6 files changed

+479
-300
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)