diff --git a/pkg/blob/nodeserver.go b/pkg/blob/nodeserver.go index 809771ae7..69778547d 100644 --- a/pkg/blob/nodeserver.go +++ b/pkg/blob/nodeserver.go @@ -363,10 +363,6 @@ func (d *Driver) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRe err = annotator.SendProvisionVolume(pv, d.cloud.Config.AzureAuthConfig, providedAuth) if err != nil { - if err == cv.ErrVolumeAlreadyBeingProvisioned { - return &csi.NodeStageVolumeResponse{}, nil - } - return nil, err } diff --git a/pkg/edgecache/cachevolume/pvc_annotator.go b/pkg/edgecache/cachevolume/pvc_annotator.go index 6fbfa49fc..57f2b189a 100644 --- a/pkg/edgecache/cachevolume/pvc_annotator.go +++ b/pkg/edgecache/cachevolume/pvc_annotator.go @@ -17,7 +17,6 @@ limitations under the License. package cachevolume import ( - "errors" "fmt" "golang.org/x/exp/maps" @@ -42,8 +41,7 @@ const ( ) var ( - validStorageAuthentications = []string{"WorkloadIdentity", "AccountKey"} - ErrVolumeAlreadyBeingProvisioned = errors.New("pv is already being provisioned") + validStorageAuthentications = []string{"WorkloadIdentity", "AccountKey"} ) type BlobAuth struct { @@ -135,22 +133,12 @@ func (c *PVCAnnotator) buildAnnotations(pv *v1.PersistentVolume, cfg config.Azur } func (c *PVCAnnotator) SendProvisionVolume(pv *v1.PersistentVolume, cloudConfig config.AzureAuthConfig, providedAuth BlobAuth) error { - pvc, err := blobcsiutil.GetPVCByName(c.client, pv.Spec.ClaimRef.Name, pv.Spec.ClaimRef.Namespace) - if err != nil { - return err - } - if valid := c.requestAuthIsValid(providedAuth.authType); !valid { err := fmt.Errorf("requested storage auth %s is not a member of valid auths %+v", providedAuth.authType, validStorageAuthentications) klog.Error(err) return err } - if prepare := c.needsToBeProvisioned(pvc); !prepare { - klog.Info("pv is already being provisioned") - return ErrVolumeAlreadyBeingProvisioned - } - annotations, err := c.buildAnnotations(pv, cloudConfig, providedAuth) if err != nil { return err