With the zRAM patches I've removed what seemed to be an unused constant -- EARLY_SWAP_RAM. Turns out blivet uses it to check if the installation will work without swap or not. I have no idea how the constant's name relates to that, but instead of adding it back I'd like to start with removing the check from blivet. The actual amount of RAM anaconda requires for installation without swap depends on the installation mode (GUI/TUI) so the check needs to be more complex. And it shouldn't be done in blivet in the first place.
A follow-up patch I'll sent during the week will add the check back, but into Anaconda's codebase. Maybe moving all the sanityCheck code from blivet as it is installer specific and has nothing to do with blivet.
Vratislav Podzimek (1): Remove a wrong RAM/swap check (#1123466)
blivet/__init__.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
If user doesn't create any swap partitions, Anaconda may require more RAM to install packages. But the amount of RAM depends on the installation mode (GUI/TUI) and such check should be in the Anaconda not blivet. Let's start with removing the check and hot-fixing the bug.
Signed-off-by: Vratislav Podzimek vpodzime@redhat.com --- blivet/__init__.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
diff --git a/blivet/__init__.py b/blivet/__init__.py index f8e8ac3..ff77b53 100644 --- a/blivet/__init__.py +++ b/blivet/__init__.py @@ -28,7 +28,6 @@ __version__ = '0.61' ## in question or care must be taken so they are imported only after ## enable_installer_mode is called. ## -isys = None iutil = None ROOT_PATH = '/' _storageRoot = ROOT_PATH @@ -102,7 +101,6 @@ log = logging.getLogger("blivet")
def enable_installer_mode(): """ Configure the module for use by anaconda (OS installer). """ - global isys global iutil global ROOT_PATH global _storageRoot @@ -113,7 +111,6 @@ def enable_installer_mode(): global errorHandler global ERROR_RAISE
- from pyanaconda import isys # pylint: disable=redefined-outer-name from pyanaconda import iutil # pylint: disable=redefined-outer-name from pyanaconda.constants import shortProductName # pylint: disable=redefined-outer-name from pyanaconda.constants import productName # pylint: disable=redefined-outer-name @@ -1689,22 +1686,11 @@ class Blivet(object): "'biosboot' type partition.")))
if not swaps: - installed = util.total_memory() - required = Size("%s KiB" % isys.EARLY_SWAP_RAM) - - if installed < required: - exns.append( - SanityError(_("You have not specified a swap partition. " - "%(requiredMem)s of memory is required to continue installation " - "without a swap partition, but you only have %(installedMem)s.") - % {"requiredMem": required, - "installedMem": installed})) - else: - exns.append( - SanityWarning(_("You have not specified a swap partition. " - "Although not strictly required in all cases, " - "it will significantly improve performance " - "for most installations."))) + exns.append( + SanityWarning(_("You have not specified a swap partition. " + "Although not strictly required in all cases, " + "it will significantly improve performance " + "for most installations."))) no_uuid = [s for s in swaps if s.format.exists and not s.format.uuid] if no_uuid: exns.append(
----- Original Message -----
From: "Vratislav Podzimek" vpodzime@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Sunday, July 27, 2014 4:04:04 PM Subject: [blivet][master/f21-branch] Hot-fix for a bug #1123466
With the zRAM patches I've removed what seemed to be an unused constant -- EARLY_SWAP_RAM. Turns out blivet uses it to check if the installation will work without swap or not. I have no idea how the constant's name relates to that, but instead of adding it back I'd like to start with removing the check from blivet. The actual amount of RAM anaconda requires for installation without swap depends on the installation mode (GUI/TUI) so the check needs to be more complex. And it shouldn't be done in blivet in the first place.
A follow-up patch I'll sent during the week will add the check back, but into Anaconda's codebase. Maybe moving all the sanityCheck code from blivet as it is installer specific and has nothing to do with blivet.
Vratislav Podzimek (1): Remove a wrong RAM/swap check (#1123466)
blivet/__init__.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
-- 1.9.3
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
Looks good to me for the time being, ACK!
----- Original Message -----
From: "Vratislav Podzimek" vpodzime@redhat.com To: anaconda-patches@lists.fedorahosted.org Sent: Sunday, July 27, 2014 4:04:04 PM Subject: [blivet][master/f21-branch] Hot-fix for a bug #1123466
With the zRAM patches I've removed what seemed to be an unused constant -- EARLY_SWAP_RAM. Turns out blivet uses it to check if the installation will work without swap or not. I have no idea how the constant's name relates to that, but instead of adding it back I'd like to start with removing the check from blivet. The actual amount of RAM anaconda requires for installation without swap depends on the installation mode (GUI/TUI) so the check needs to be more complex. And it shouldn't be done in blivet in the first place.
A follow-up patch I'll sent during the week will add the check back, but into Anaconda's codebase. Maybe moving all the sanityCheck code from blivet as it is installer specific and has nothing to do with blivet.
The above seems like a really good idea.
- mulhern
Vratislav Podzimek (1): Remove a wrong RAM/swap check (#1123466)
blivet/__init__.py | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-)
-- 1.9.3
anaconda-patches mailing list anaconda-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
anaconda-patches@lists.fedorahosted.org