diff --git a/pkg/gce-pd-csi-driver/controller.go b/pkg/gce-pd-csi-driver/controller.go index 595baf9e6..70fdbf338 100644 --- a/pkg/gce-pd-csi-driver/controller.go +++ b/pkg/gce-pd-csi-driver/controller.go @@ -396,12 +396,16 @@ func (gceCS *GCEControllerServer) ControllerPublishVolume(ctx context.Context, r return gceCS.executeControllerPublishVolume(ctx, req) } - // Node is marked so queue up the request + // Node is marked so queue up the request. Note the original gRPC context may get canceled, + // so a new one is created here. + // + // Note that the original context probably has a timeout (see csiAttach in external-attacher), + // which is ignored. gceCS.queue.AddRateLimited(&workItem{ - ctx: ctx, + ctx: context.Background(), publishReq: req, }) - return &csi.ControllerPublishVolumeResponse{}, nil + return nil, status.Error(codes.Unavailable, "Request queued due to error condition on node") } func (gceCS *GCEControllerServer) validateControllerPublishVolumeRequest(ctx context.Context, req *csi.ControllerPublishVolumeRequest) (string, *meta.Key, error) {