Skip to content

Commit

Permalink
pvc_annotator: remove already being provisioned check
Browse files Browse the repository at this point in the history
  • Loading branch information
chaireze committed Jul 12, 2023
1 parent ba0a18e commit 52231e2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions pkg/edgecache/cachevolume/pvc_annotator.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,21 @@ 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
}
// 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
}
// 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 {
Expand Down

0 comments on commit 52231e2

Please sign in to comment.