summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorDavid Lehman <dlehman@redhat.com>2009-11-11 14:49:32 -0600
committerDavid Lehman <dlehman@redhat.com>2009-11-12 10:28:33 -0600
commit61870c8efeddf9ebca8a194fda24d0ba61255b9c (patch)
tree8173968dbc45ac145da1689f2a2e8ea263f562d7 /storage
parent723d7289bcfdd90d305ec4eb8248b3868f659313 (diff)
downloadanaconda-61870c8efeddf9ebca8a194fda24d0ba61255b9c.tar.gz
anaconda-61870c8efeddf9ebca8a194fda24d0ba61255b9c.tar.xz
anaconda-61870c8efeddf9ebca8a194fda24d0ba61255b9c.zip
Handle case of not enough space in VG more gracefully. (#533797)
Diffstat (limited to 'storage')
-rw-r--r--storage/partitioning.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/storage/partitioning.py b/storage/partitioning.py
index dff8804df..a23efb396 100644
--- a/storage/partitioning.py
+++ b/storage/partitioning.py
@@ -1510,7 +1510,11 @@ def growLVM(storage):
""" Grow LVs according to the sizes of the PVs. """
for vg in storage.vgs:
total_free = vg.freeSpace
- if not total_free:
+ if total_free < 0:
+ # by now we have allocated the PVs so if there isn't enough
+ # space in the VG we have a real problem
+ raise PartitioningError("not enough space for LVM requests")
+ elif not total_free:
log.debug("vg %s has no free space" % vg.name)
continue