From 71809fb6071a86156f881e20d4845cbd47606862 Mon Sep 17 00:00:00 2001 From: David Kupka Date: Wed, 16 Dec 2015 12:45:24 +0000 Subject: [PATCH] installer: Fix logic of reading option values from cache. Only options explicitly set must be stored before installer exits first step of external CA setup. When installer continues all stored option values must be restored. https://fedorahosted.org/freeipa/ticket/5556 Reviewed-By: Jan Cholasta --- ipaserver/install/server/install.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ipaserver/install/server/install.py b/ipaserver/install/server/install.py index 71992db0d39e1969649587486031a8fb1a03419d..01dffd08d4c929ebc5ecb6e6b0a8b685c1320dbd 100644 --- a/ipaserver/install/server/install.py +++ b/ipaserver/install/server/install.py @@ -343,9 +343,7 @@ def install_check(installer): sys.exit("Directory Manager password required") try: cache_vars = read_cache(dm_password) - for name, value in cache_vars.iteritems(): - if name not in options.__dict__: - options.__dict__[name] = value + options.__dict__.update(cache_vars) if cache_vars.get('external_ca', False): options.external_ca = False options.interactive = False @@ -767,7 +765,8 @@ def install(installer): options.host_name = host_name options.forwarders = dns.dns_forwarders options.reverse_zones = dns.reverse_zones - cache_vars = {n: getattr(options, n) for o, n in installer.knobs()} + cache_vars = {n: options.__dict__[n] for o, n in installer.knobs() + if n in options.__dict__} write_cache(cache_vars) ca.install_step_0(False, None, options) -- 2.5.0