Skip to content

Commit

Permalink
removed check added debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
koin612 committed Mar 11, 2021
1 parent 9031518 commit 0bb776a
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions ldp/local-directory-provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,8 @@ func (p *cephFSProvisioner) CanBePlacedOnLocalNode(ctx context.Context, claim *v
}
for _, pvc := range pvcs.Items {
glog.Infof("Found PVC %s (claim: %s)", pvc.Name, claim.Name)
glog.Infof("pvc: %s; claim: %s", pvc.Annotations[provisionerNodeKey], claim.Annotations[provisionerNodeKey])
if pvc.Name == claim.Name {
glog.Infof("pvc.Name == claim.Name: true")
eq := p.HasSameLabels(&pvc, claim)
glog.Infof("%s and %s are the same: %s", pvc.Labels, claim.Labels, strconv.FormatBool(eq))
if eq {
return true
}
continue
}

Expand All @@ -184,9 +179,7 @@ func (p *cephFSProvisioner) CanBePlacedOnLocalNode(ctx context.Context, claim *v
}

func (p *cephFSProvisioner) HasSameLabels(a *v1.PersistentVolumeClaim, b *v1.PersistentVolumeClaim) (bool) {
eq := reflect.DeepEqual(a.Labels, b.Labels)
glog.Infof("labels %s and %s are the same: %s", a.Labels, b.Labels, strconv.FormatBool(eq))
return eq
return reflect.DeepEqual(a.Labels, b.Labels)
}

func (p *cephFSProvisioner) PlaceOnLocalNode(ctx context.Context, oldClaim *v1.PersistentVolumeClaim) (error) {
Expand Down

0 comments on commit 0bb776a

Please sign in to comment.