Handle partition allocation failures due to alignment adjustments.
Resolves: rhbz#693271
---
pyanaconda/storage/partitioning.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/pyanaconda/storage/partitioning.py b/pyanaconda/storage/partitioning.py
index 0051b93..b3847c3 100644
--- a/pyanaconda/storage/partitioning.py
+++ b/pyanaconda/storage/partitioning.py
@@ -830,6 +830,8 @@ def addPartition(disklabel, free, part_type, size):
if not disklabel.endAlignment.isAligned(free, end):
end = disklabel.endAlignment.alignNearest(free, end)
log.debug("adjusted length from %d to %d" % (length, end - start + 1))
+ if start > end:
+ raise PartitioningError("unable to allocate aligned partition")
new_geom = parted.Geometry(device=disklabel.partedDevice,
start=start,
--
1.7.3.4
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
|