From eb61e51e083d6418fca6b34b3c946979b6fecb9c Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Mon, 20 May 2024 18:37:11 -0500 Subject: [PATCH] Restore pki_instance_configuration_path param In PKI 11.5 the pki_instance_configuration_path param was removed since it's meant to be used only internally and has been redefined somewhere else. However, since the param is actually used by IPA to support containers it has been restored as an alternative to pkispawn --conf option. --- base/server/python/pki/server/pkispawn.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/base/server/python/pki/server/pkispawn.py b/base/server/python/pki/server/pkispawn.py index 3d22243e49c..5b2f1d5fcf0 100644 --- a/base/server/python/pki/server/pkispawn.py +++ b/base/server/python/pki/server/pkispawn.py @@ -560,7 +560,20 @@ def main(argv): deployer.instance.group = deployer.mdict['pki_group'] if args.conf_dir: - deployer.instance.actual_conf_dir = args.conf_dir + # Use --conf if specified. + conf_dir = args.conf_dir + + else: + # Otherwise, use pki_instance_configuration_path param (default: None). + # This param is used by IPA to support containers. See: + # https://github.com/freeipa/freeipa/blob/master/install/share/ipaca_default.ini + conf_dir = deployer.mdict.get('pki_instance_configuration_path') + + if conf_dir: + # If conf_dir is specified, the config files will be stored in the + # specified folder, and the /conf will link to that folder. + # Otherwise, config files will be stored in /conf directly. + deployer.instance.actual_conf_dir = conf_dir if args.logs_dir: deployer.instance.actual_logs_dir = args.logs_dir