summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/server/upgrade.py
diff options
context:
space:
mode:
authorFraser Tweedale <ftweedal@redhat.com>2015-11-23 12:09:32 +1100
committerJan Cholasta <jcholast@redhat.com>2015-11-24 10:12:24 +0100
commit620036d26e98fdcefff00168e9e5463a8257d49c (patch)
tree5f06b9eb125370d9dcdee938e18c31d1d8a3fe5d /ipaserver/install/server/upgrade.py
parent6fe0a898077a74924b6ccaf6dfbaf2d166175722 (diff)
downloadfreeipa-620036d26e98fdcefff00168e9e5463a8257d49c.tar.gz
freeipa-620036d26e98fdcefff00168e9e5463a8257d49c.tar.xz
freeipa-620036d26e98fdcefff00168e9e5463a8257d49c.zip
Add profiles and default CA ACL on migration
Profiles and the default CA ACL were not being added during replica install from pre-4.2 servers. Update ipa-replica-install to add these if they are missing. Also update the caacl plugin to prevent deletion of the default CA ACL and instruct the administrator to disable it instead. To ensure that the cainstance installation can add profiles, supply the RA certificate as part of the instance configuration. Certmonger renewal setup is avoided at this point because the NSSDB gets reinitialised later in installation procedure. Also move the addition of the default CA ACL from dsinstance installation to cainstance installation. Fixes: https://fedorahosted.org/freeipa/ticket/5459 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver/install/server/upgrade.py')
-rw-r--r--ipaserver/install/server/upgrade.py13
1 files changed, 1 insertions, 12 deletions
diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
index b9621a39d..84339b0a2 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -1328,18 +1328,7 @@ def add_default_caacl(ca):
return
if ca.is_configured():
- if not api.Backend.ldap2.isconnected():
- try:
- api.Backend.ldap2.connect(autobind=True)
- except ipalib.errors.PublicError as e:
- root_logger.error("Cannot connect to LDAP to add CA ACLs: %s", e)
- return
-
- if not api.Command.caacl_find()['result']:
- api.Command.caacl_add(u'hosts_services_caIPAserviceCert',
- hostcategory=u'all', servicecategory=u'all')
- api.Command.caacl_add_profile(u'hosts_services_caIPAserviceCert',
- certprofile=(u'caIPAserviceCert',))
+ cainstance.ensure_default_caacl()
sysupgrade.set_upgrade_state('caacl', 'add_default_caacl', True)