|
|
aa60fb |
From c7f76e4f6c0f288b184152f5f6f45d11287914b3 Mon Sep 17 00:00:00 2001
|
|
|
aa60fb |
From: Jan Cholasta <jcholast@redhat.com>
|
|
|
aa60fb |
Date: Mon, 25 Jan 2016 08:48:42 +0100
|
|
|
aa60fb |
Subject: [PATCH] CA install: explicitly set dogtag_version to 10
|
|
|
aa60fb |
|
|
|
aa60fb |
When installing new CA master, explicitly set the dogtag_version option to
|
|
|
aa60fb |
10 in api.bootstrap() to prevent failures in code which expects the value
|
|
|
aa60fb |
to be 10 rather than the default value of 9.
|
|
|
aa60fb |
|
|
|
aa60fb |
https://fedorahosted.org/freeipa/ticket/5611
|
|
|
aa60fb |
|
|
|
aa60fb |
Reviewed-By: Martin Babinsky <mbabinsk@redhat.com>
|
|
|
aa60fb |
---
|
|
|
aa60fb |
install/tools/ipa-ca-install | 2 +-
|
|
|
aa60fb |
ipaserver/install/cainstance.py | 6 +++---
|
|
|
aa60fb |
ipaserver/install/server/upgrade.py | 2 +-
|
|
|
aa60fb |
3 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
aa60fb |
|
|
|
aa60fb |
diff --git a/install/tools/ipa-ca-install b/install/tools/ipa-ca-install
|
|
|
aa60fb |
index 6564e4d0304d4e189b133c495b75f200b04e2988..e8ccaef5b90807f452f77c2b62641df3952180d6 100755
|
|
|
aa60fb |
--- a/install/tools/ipa-ca-install
|
|
|
aa60fb |
+++ b/install/tools/ipa-ca-install
|
|
|
aa60fb |
@@ -162,7 +162,7 @@ def install_master(safe_options, options):
|
|
|
aa60fb |
|
|
|
aa60fb |
# override ra_plugin setting read from default.conf so that we have
|
|
|
aa60fb |
# functional dogtag backend plugins during CA install
|
|
|
aa60fb |
- api.bootstrap(in_server=True, ra_plugin='dogtag')
|
|
|
aa60fb |
+ api.bootstrap(in_server=True, ra_plugin='dogtag', dogtag_version=10)
|
|
|
aa60fb |
api.finalize()
|
|
|
aa60fb |
|
|
|
aa60fb |
dm_password = options.password
|
|
|
aa60fb |
diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py
|
|
|
aa60fb |
index d9bf4f31af5a922dd6f977a5011f50ce7cea8896..369902ad04b197c9e9516503c1f81c4de1ef153b 100644
|
|
|
aa60fb |
--- a/ipaserver/install/cainstance.py
|
|
|
aa60fb |
+++ b/ipaserver/install/cainstance.py
|
|
|
aa60fb |
@@ -478,7 +478,7 @@ class CAInstance(DogtagInstance):
|
|
|
aa60fb |
self.http_proxy)
|
|
|
aa60fb |
self.step("restarting certificate server", self.restart_instance)
|
|
|
aa60fb |
self.step("migrating certificate profiles to LDAP",
|
|
|
aa60fb |
- migrate_profiles_to_ldap)
|
|
|
aa60fb |
+ lambda: migrate_profiles_to_ldap(self.dogtag_constants))
|
|
|
aa60fb |
self.step("importing IPA certificate profiles",
|
|
|
aa60fb |
import_included_profiles)
|
|
|
aa60fb |
self.step("adding default CA ACL", ensure_default_caacl)
|
|
|
aa60fb |
@@ -1768,7 +1768,7 @@ def import_included_profiles():
|
|
|
aa60fb |
conn.disconnect()
|
|
|
aa60fb |
|
|
|
aa60fb |
|
|
|
aa60fb |
-def migrate_profiles_to_ldap():
|
|
|
aa60fb |
+def migrate_profiles_to_ldap(dogtag_constants):
|
|
|
aa60fb |
"""Migrate profiles from filesystem to LDAP.
|
|
|
aa60fb |
|
|
|
aa60fb |
This must be run *after* switching to the LDAPProfileSubsystem
|
|
|
aa60fb |
@@ -1783,7 +1783,7 @@ def migrate_profiles_to_ldap():
|
|
|
aa60fb |
api.Backend.ra_certprofile._read_password()
|
|
|
aa60fb |
api.Backend.ra_certprofile.override_port = 8443
|
|
|
aa60fb |
|
|
|
aa60fb |
- with open(dogtag.configured_constants().CS_CFG_PATH) as f:
|
|
|
aa60fb |
+ with open(dogtag_constants.CS_CFG_PATH) as f:
|
|
|
aa60fb |
cs_cfg = f.read()
|
|
|
aa60fb |
match = re.search(r'^profile\.list=(\S*)', cs_cfg, re.MULTILINE)
|
|
|
aa60fb |
profile_ids = match.group(1).split(',')
|
|
|
aa60fb |
diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
|
|
|
aa60fb |
index 1f1cfeb672809c0298c69c121ac38d6c7a482d11..0a46635979497f8028465c2295b22485fd9c0279 100644
|
|
|
aa60fb |
--- a/ipaserver/install/server/upgrade.py
|
|
|
aa60fb |
+++ b/ipaserver/install/server/upgrade.py
|
|
|
aa60fb |
@@ -336,7 +336,7 @@ def ca_enable_ldap_profile_subsystem(ca):
|
|
|
aa60fb |
separator='=')
|
|
|
aa60fb |
|
|
|
aa60fb |
ca.restart(dogtag.configured_constants().PKI_INSTANCE_NAME)
|
|
|
aa60fb |
- cainstance.migrate_profiles_to_ldap()
|
|
|
aa60fb |
+ cainstance.migrate_profiles_to_ldap(caconfig)
|
|
|
aa60fb |
|
|
|
aa60fb |
return needs_update
|
|
|
aa60fb |
|
|
|
aa60fb |
--
|
|
|
aa60fb |
2.5.0
|
|
|
aa60fb |
|