URL: https://github.com/freeipa/freeipa/pull/5289
Author: t-woerner
 Title: #5289: ipaserver: Check memory requirement also for CA
Action: opened

PR body:
"""
There is no --setup-ca option for the server installer but options.setup_ca
has been used as an option for installutils.check_available_memory.
Therefore it always was False. options.setup_ca has been set later on
depending on options.dirsrv_cert_files.

This means that the check always ignoring the needed memory for the CA.
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5289/head:pr5289
git checkout pr5289
From cc509b17e19f5a82904afacb2c97016d96b5a333 Mon Sep 17 00:00:00 2001
From: Thomas Woerner <[email protected]>
Date: Tue, 24 Nov 2020 14:57:26 +0100
Subject: [PATCH] Check memory requirement also for CA

There is no --setup-ca option for the server installer but options.setup_ca
has been used as an option for installutils.check_available_memory.
Therefore it always was False. options.setup_ca has been set later on
depending on options.dirsrv_cert_files.

This means that the check always ignoring the needed memory for the CA.
---
 ipaserver/install/server/install.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py
index c0d33f3e71f..9f8302969fe 100644
--- a/ipaserver/install/server/install.py
+++ b/ipaserver/install/server/install.py
@@ -346,6 +346,13 @@ def install_check(installer):
     dirsrv_ca_cert = None
     pkinit_ca_cert = None
 
+    # We only set up the CA if the PKCS#12 options are not given.
+    if options.dirsrv_cert_files:
+        setup_ca = False
+    else:
+        setup_ca = True
+    options.setup_ca = setup_ca
+
     if not options.skip_mem_check:
         installutils.check_available_memory(ca=options.setup_ca)
     tasks.check_ipv6_stack_enabled()
@@ -408,13 +415,6 @@ def install_check(installer):
         except Exception as e:
             raise ScriptError("Cannot process the cache file: %s" % str(e))
 
-    # We only set up the CA if the PKCS#12 options are not given.
-    if options.dirsrv_cert_files:
-        setup_ca = False
-    else:
-        setup_ca = True
-    options.setup_ca = setup_ca
-
     if not setup_ca and options.ca_subject:
         raise ScriptError(
             "--ca-subject cannot be used with CA-less installation")
_______________________________________________
FreeIPA-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/[email protected]

Reply via email to