From a08dd1585cdc73b071a4fd5332958d99df793067 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Thu, 14 Feb 2019 14:57:39 -0800 Subject: [PATCH] Remove 3G minimum from lorax-composer The reason for the 3G minimum was because anaconda had a bug with how it calculated minimum disk size when using kickstart. The gix for this has been in Anaconda since 29.19-1, so we can now remove our limit and create somewhat smaller disk images. (cherry picked from commit 7e78dc368f4f72d1e3e7449e56d93213ec8eb4f7) --- lorax.spec | 2 +- src/pylorax/api/compose.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lorax.spec b/lorax.spec index 2a151077..e848c1eb 100644 --- a/lorax.spec +++ b/lorax.spec @@ -135,7 +135,7 @@ Requires: libgit2 Requires: libgit2-glib Requires: python3-flask Requires: python3-gevent -Requires: anaconda-tui +Requires: anaconda-tui >= 29.19-1 Requires: qemu-img Requires: tar diff --git a/src/pylorax/api/compose.py b/src/pylorax/api/compose.py index 7a204f58..9b1e119c 100644 --- a/src/pylorax/api/compose.py +++ b/src/pylorax/api/compose.py @@ -340,9 +340,7 @@ def start_build(cfg, dnflock, gitlock, branch, recipe_name, compose_type, test_m log.debug("installed_size = %d, template_size=%d", installed_size, template_size) # Minimum LMC disk size is 1GiB, and anaconda bumps the estimated size up by 10% (which doesn't always work). - # XXX BUT Anaconda has a bug, it won't execute a kickstart on a disk smaller than 3000 MB - # XXX There is an upstream patch pending, but until then, use that as the minimum - installed_size = max(3e9, int((installed_size+template_size))) * 1.2 + installed_size = int((installed_size+template_size)) * 1.2 log.debug("/ partition size = %d", installed_size) # Create the results directory