summaryrefslogtreecommitdiffstats
path: root/ipaserver
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2015-08-18 18:01:09 +0200
committerJan Cholasta <jcholast@redhat.com>2015-08-19 11:55:21 +0200
commit556e97bf23657cb11d93c7d8a37b5ed4840fdb7a (patch)
treecbbedb546cbbe5cd312db298c051ca322ca80ddc /ipaserver
parent9fe67dcf2b6c10ca4eebab1c573d101316f481cd (diff)
downloadfreeipa-556e97bf23657cb11d93c7d8a37b5ed4840fdb7a.tar.gz
freeipa-556e97bf23657cb11d93c7d8a37b5ed4840fdb7a.tar.xz
freeipa-556e97bf23657cb11d93c7d8a37b5ed4840fdb7a.zip
Server Upgrade: Start DS before CA is started.
https://fedorahosted.org/freeipa/ticket/5232 Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipaserver')
-rw-r--r--ipaserver/install/server/upgrade.py14
1 files changed, 12 insertions, 2 deletions
diff --git a/ipaserver/install/server/upgrade.py b/ipaserver/install/server/upgrade.py
index d7480d7cd..f8a4ff282 100644
--- a/ipaserver/install/server/upgrade.py
+++ b/ipaserver/install/server/upgrade.py
@@ -1328,6 +1328,13 @@ def upgrade_configuration():
raise RuntimeError("ipa-rewrite.conf doesn't exists (is this server?)")
# Ok, we are an IPA server, do the additional tests
+ ds_serverid = installutils.realm_to_serverid(api.env.realm)
+ ds = dsinstance.DsInstance()
+
+ # start DS, CA will not start without running DS, and cause error
+ ds_running = ds.is_running()
+ if not ds_running:
+ ds.start(ds_serverid)
check_certs()
@@ -1359,7 +1366,6 @@ def upgrade_configuration():
'ca.crl.MasterCRL.enableCRLUpdates', '=')
sub_dict['CLONE']='#' if crl.lower() == 'true' else ''
- ds_serverid = installutils.realm_to_serverid(api.env.realm)
ds_dirname = dsinstance.config_dirname(ds_serverid)
upgrade_file(sub_dict, paths.HTTPD_IPA_CONF,
@@ -1396,7 +1402,6 @@ def upgrade_configuration():
http.change_mod_nss_port_from_http()
http.configure_certmonger_renewal_guard()
- ds = dsinstance.DsInstance()
ds.configure_dirsrv_ccache()
# ldap2 connection is not valid after DS restart, close connection otherwise
@@ -1526,6 +1531,11 @@ def upgrade_configuration():
set_sssd_domain_option('ipa_server_mode', 'True')
+ if ds_running and not ds.is_running():
+ ds.start(ds_serverid)
+ elif not ds_running and ds.is_running():
+ ds.stop(ds_serverid)
+
def upgrade_check(options):
try: