Joel Granados Moreno wrote:
I'm guessing the error occurs during the partgrow function and/or the
lvmgrow function. In either case its easier to just make sure that the
values are ok and raise an exception if not. For the case described in
the bug, raising an exception is the right thing to do.
---
autopart.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Feels a bit like a bandaid, but a simple band aid and that, and having paranoia
checks like this one always is good. Since this is 4.8 I'm giving +1 to the
bandaid :)
Regards,
Hans
diff --git a/autopart.py b/autopart.py
index c265942..77ac650 100644
--- a/autopart.py
+++ b/autopart.py
@@ -590,6 +590,9 @@ def growLogicalVolumes(diskset, requests):
if DEBUG_LVM_GROW:
log("Name, size, cursize, vgfree, fraction = %s %s %s %s %s", req.logicalVolumeName, req.size, cursize[req.logicalVolumeName], vgfree, fraction)
+ if req.size < 0:
+ raise PartitioningError, _("Could not allocate partitions")
+
completed.append(req)
if nochange:
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list