Skip to content

Commit

Permalink
Move the pki-tomcat restart to cainstance creation
Browse files Browse the repository at this point in the history
pki-tomcat would have been restarted in install and replicainstall
for backward compatibility reasons. As Dogtag 9 is not supported
anymore, we can move this restart only for DL0 replica installation.

https://fedorahosted.org/freeipa/ticket/6392

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Jan Cholasta <jcholast@redhat.com>
  • Loading branch information
stlaz authored and Jan Cholasta committed Nov 11, 2016
1 parent bde1d82 commit ba4df64
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
13 changes: 13 additions & 0 deletions ipaserver/install/cainstance.py
Expand Up @@ -423,6 +423,10 @@ def configure_instance(self, host_name, dm_password, admin_password,
configure_lightweight_ca_acls)
self.step("Ensure lightweight CAs container exists",
ensure_lightweight_cas_container)
if self.clone and not promote:
self.step(
"Ensuring backward compatibility",
self.__dogtag10_migration)
self.step("configure certificate renewals", self.configure_renewal)
self.step("configure Server-Cert certificate renewal", self.track_servercert)
self.step("Configure HTTP to proxy connections",
Expand Down Expand Up @@ -1276,6 +1280,15 @@ def __add_lightweight_ca_tracking_requests(self):
root_logger.warning(
"Did not find any lightweight CAs; nothing to track")

def __dogtag10_migration(self):
ld = ldapupdate.LDAPUpdate(ldapi=True, sub_dict={
'SUFFIX': api.env.basedn,
'FQDN': self.fqdn,
})
ld.update([os.path.join(paths.UPDATES_DIR,
'50-dogtag10-migration.update')]
)


def replica_ca_install_check(config, promote):
if promote:
Expand Down
3 changes: 0 additions & 3 deletions ipaserver/install/server/install.py
Expand Up @@ -854,9 +854,6 @@ def install(installer):
service.print_msg("Restarting the KDC")
krb.restart()

if setup_ca:
services.knownservices['pki_tomcatd'].restart('pki-tomcat')

if options.setup_dns:
dns.install(False, False, options)
else:
Expand Down
3 changes: 0 additions & 3 deletions ipaserver/install/server/replicainstall.py
Expand Up @@ -935,9 +935,6 @@ def install(installer):
service.print_msg("Restarting the KDC")
krb.restart()

if config.setup_ca:
services.knownservices['pki_tomcatd'].restart('pki-tomcat')

if options.setup_dns:
dns.install(False, True, options)
else:
Expand Down

0 comments on commit ba4df64

Please sign in to comment.