When checking oversubscription rate, we need to ensure that we
check the _allocated_ (apparant size) not the _available_ (actual
usage) on the NFS share. This fix ensures we are now checking the
correct values. This bug allowed (effectively) a one-time
volume allocation that would push the "apparant" size over the
oversubscription rate.
Change-Id: I189b689cb76ac2a243aa6e255ce0c80d86e247ce
Fixes: bug #1188877
# NOTE(morganfainberg): If we are setup for oversubscription
# we need to calculate the apparent available space instead
# of just using the _actual_ available space.
- if (total_available * oversub_ratio) < requested_volume_size:
+ if (total_allocated * oversub_ratio) < requested_volume_size:
LOG.debug(_('%s is above nfs_oversub_ratio'), nfs_share)
continue
- elif total_available <= requested_volume_size:
+ elif total_allocated <= requested_volume_size:
LOG.debug(_('%s is above nfs_oversub_ratio'), nfs_share)
continue