continue searching on bad size and add tests for bad size&mode

This commit is contained in:
Matthew Wong
2016-08-17 10:42:52 -04:00
parent fe817674ab
commit 6486576f56
2 changed files with 23 additions and 2 deletions

View File

@@ -119,11 +119,11 @@ func (pvIndex *persistentVolumeOrderedIndex) findByClaim(claim *api.PersistentVo
if isVolumeBoundToClaim(volume, claim) {
// this claim and volume are pre-bound; return
// the volume if the size request is satisfied,
// otherwise leave the claim pending
// otherwise continue searching for a match
volumeQty := volume.Spec.Capacity[api.ResourceStorage]
volumeSize := volumeQty.Value()
if volumeSize < requestedSize {
return nil, nil
continue
}
return volume, nil
}