2018-08-22 08:55:17 -05:00
|
|
|
@PYTHONSHEBANG@
|
2011-06-17 15:47:39 -05:00
|
|
|
# Authors: Rob Crittenden <rcritten@redhat.com>
|
|
|
|
#
|
|
|
|
# Copyright (C) 2011 Red Hat
|
|
|
|
# see file 'COPYING' for use and warranty information
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2017-11-28 01:55:59 -06:00
|
|
|
from __future__ import print_function
|
|
|
|
|
2017-05-24 09:35:07 -05:00
|
|
|
import logging
|
2011-06-17 15:47:39 -05:00
|
|
|
import sys
|
2014-03-18 10:23:30 -05:00
|
|
|
import os
|
|
|
|
import shutil
|
2015-08-20 16:10:23 -05:00
|
|
|
import tempfile
|
2016-11-23 10:40:47 -06:00
|
|
|
|
|
|
|
from ipalib.install.kinit import kinit_keytab
|
2011-06-17 15:47:39 -05:00
|
|
|
from ipapython import ipautil
|
|
|
|
|
2017-11-30 19:27:26 -06:00
|
|
|
from ipaclient.install import ipa_certupdate
|
2014-03-18 10:23:30 -05:00
|
|
|
from ipaserver.install import installutils
|
2015-08-20 16:10:23 -05:00
|
|
|
from ipaserver.install.installutils import check_creds, ReplicaConfig
|
2016-10-24 07:33:19 -05:00
|
|
|
from ipaserver.install import dsinstance, ca
|
|
|
|
from ipaserver.install import cainstance, service
|
2018-04-26 05:06:36 -05:00
|
|
|
from ipaserver.install import custodiainstance
|
2018-07-12 07:37:18 -05:00
|
|
|
from ipaserver.masters import find_providing_server
|
2011-06-17 15:47:39 -05:00
|
|
|
from ipapython import version
|
2015-06-08 00:23:56 -05:00
|
|
|
from ipalib import api
|
2018-09-10 09:19:24 -05:00
|
|
|
from ipalib.constants import DOMAIN_LEVEL_1
|
2011-06-17 15:47:39 -05:00
|
|
|
from ipapython.config import IPAOptionParser
|
2017-05-24 09:35:07 -05:00
|
|
|
from ipapython.ipa_log_manager import standard_logging_setup
|
2014-06-17 04:45:43 -05:00
|
|
|
from ipaplatform.paths import paths
|
2011-06-17 15:47:39 -05:00
|
|
|
|
2017-05-24 09:35:07 -05:00
|
|
|
logger = logging.getLogger(os.path.basename(__file__))
|
|
|
|
|
2014-06-17 04:45:43 -05:00
|
|
|
log_file_name = paths.IPAREPLICA_CA_INSTALL_LOG
|
2012-05-31 07:34:09 -05:00
|
|
|
REPLICA_INFO_TOP_DIR = None
|
2011-06-17 15:47:39 -05:00
|
|
|
|
|
|
|
def parse_options():
|
2018-08-07 04:14:51 -05:00
|
|
|
usage = "%prog [options]"
|
2011-06-17 15:47:39 -05:00
|
|
|
parser = IPAOptionParser(usage=usage, version=version.VERSION)
|
|
|
|
parser.add_option("-d", "--debug", dest="debug", action="store_true",
|
|
|
|
default=False, help="gather extra debugging information")
|
|
|
|
parser.add_option("-p", "--password", dest="password", sensitive=True,
|
|
|
|
help="Directory Manager (existing master) password")
|
|
|
|
parser.add_option("-w", "--admin-password", dest="admin_password", sensitive=True,
|
|
|
|
help="Admin user Kerberos password used for connection check")
|
|
|
|
parser.add_option("--no-host-dns", dest="no_host_dns", action="store_true",
|
|
|
|
default=False,
|
|
|
|
help="Do not use DNS for hostname lookup during installation")
|
|
|
|
parser.add_option("--skip-conncheck", dest="skip_conncheck", action="store_true",
|
|
|
|
default=False, help="skip connection check to remote master")
|
Fix schema replication from old masters
The new merged database will replicate with both the IPA and CA trees, so all
DS instances (IPA and CA on the existing master, and the merged one on the
replica) need to have the same schema.
Dogtag does all its schema modifications online. Those are replicated normally.
The basic IPA schema, however, is delivered in ldif files, which are not
replicated. The files are not present on old CA DS instances. Any schema
update that references objects in these files will fail.
The whole 99user.ldif (i.e. changes introduced dynamically over LDAP) is
replicated as a blob. If we updated the old master's CA schema dynamically
during replica install, it would conflict with updates done during the
installation: the one with the lower CSN would get lost.
Dogtag's spawn script recently grew a new flag, 'pki_clone_replicate_schema'.
Turning it off tells Dogtag to create its schema in the clone, where the IPA
modifications are taking place, so that it is not overwritten by the IPA schema
on replication.
The patch solves the problems by:
- In __spawn_instance, turning off the pki_clone_replicate_schema flag.
- Providing a script to copy the IPA schema files to the CA DS instance.
The script needs to be copied to old masters and run there.
- At replica CA install, checking if the schema is updated, and failing if not.
The --skip-schema-check option is added to ipa-{replica,ca}-install to
override the check.
All pre-3.1 CA servers in a domain will have to have the script run on them to
avoid schema replication errors.
https://fedorahosted.org/freeipa/ticket/3213
2012-10-24 03:37:16 -05:00
|
|
|
parser.add_option("--skip-schema-check", dest="skip_schema_check", action="store_true",
|
|
|
|
default=False, help="skip check for updated CA DS schema on the remote master")
|
2011-06-17 15:47:39 -05:00
|
|
|
parser.add_option("-U", "--unattended", dest="unattended", action="store_true",
|
|
|
|
default=False, help="unattended installation never prompts the user")
|
2014-06-16 03:41:57 -05:00
|
|
|
parser.add_option("--external-ca", dest="external_ca", action="store_true",
|
|
|
|
default=False, help="Generate a CSR to be signed by an external CA")
|
2017-05-17 19:18:20 -05:00
|
|
|
ext_cas = tuple(x.value for x in cainstance.ExternalCAType)
|
2014-10-08 03:51:31 -05:00
|
|
|
parser.add_option("--external-ca-type", dest="external_ca_type",
|
2016-11-02 06:06:17 -05:00
|
|
|
type="choice", choices=ext_cas,
|
|
|
|
metavar="{{{0}}}".format(",".join(ext_cas)),
|
2017-02-23 07:09:39 -06:00
|
|
|
help="Type of the external CA. Default: generic")
|
2017-07-25 02:03:36 -05:00
|
|
|
parser.add_option("--external-ca-profile", dest="external_ca_profile",
|
|
|
|
type='constructor', constructor=cainstance.ExternalCAProfile,
|
|
|
|
default=None, metavar="PROFILE-SPEC",
|
|
|
|
help="Specify the certificate profile/template to use "
|
|
|
|
"at the external CA")
|
2014-09-24 09:31:39 -05:00
|
|
|
parser.add_option("--external-cert-file", dest="external_cert_files",
|
|
|
|
action="append", metavar="FILE",
|
|
|
|
help="File containing the IPA CA certificate and the external CA certificate chain")
|
2016-11-02 06:06:17 -05:00
|
|
|
ca_algos = ('SHA1withRSA', 'SHA256withRSA', 'SHA512withRSA')
|
2014-10-08 05:18:06 -05:00
|
|
|
parser.add_option("--ca-signing-algorithm", dest="ca_signing_algorithm",
|
2016-11-02 06:06:17 -05:00
|
|
|
type="choice", choices=ca_algos,
|
|
|
|
metavar="{{{0}}}".format(",".join(ca_algos)),
|
2014-10-08 05:18:06 -05:00
|
|
|
help="Signing algorithm of the IPA CA certificate")
|
2015-08-20 16:10:23 -05:00
|
|
|
parser.add_option("-P", "--principal", dest="principal", sensitive=True,
|
|
|
|
default=None, help="User allowed to manage replicas")
|
2016-11-30 00:26:15 -06:00
|
|
|
parser.add_option("--subject-base", dest="subject_base",
|
|
|
|
default=None,
|
|
|
|
help=(
|
|
|
|
"The certificate subject base "
|
2016-11-16 17:26:02 -06:00
|
|
|
"(default O=<realm-name>). "
|
|
|
|
"RDNs are in LDAP order (most specific RDN first)."))
|
2016-11-16 04:49:36 -06:00
|
|
|
parser.add_option("--ca-subject", dest="ca_subject",
|
|
|
|
default=None,
|
|
|
|
help=(
|
|
|
|
"The CA certificate subject DN "
|
2016-11-16 17:26:02 -06:00
|
|
|
"(default CN=Certificate Authority,O=<realm-name>). "
|
|
|
|
"RDNs are in LDAP order (most specific RDN first)."))
|
2011-06-17 15:47:39 -05:00
|
|
|
|
|
|
|
options, args = parser.parse_args()
|
|
|
|
safe_options = parser.get_safe_opts(options)
|
|
|
|
|
2014-06-16 03:41:57 -05:00
|
|
|
if args:
|
2018-09-10 09:19:24 -05:00
|
|
|
parser.error("Too many arguments provided")
|
2011-06-17 15:47:39 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
if options.external_ca:
|
|
|
|
if options.external_cert_files:
|
|
|
|
parser.error("You cannot specify --external-cert-file "
|
|
|
|
"together with --external-ca")
|
2015-06-08 00:23:56 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
if options.external_ca_type and not options.external_ca:
|
|
|
|
parser.error(
|
|
|
|
"You cannot specify --external-ca-type without --external-ca")
|
2014-10-08 03:51:31 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
if options.external_ca_profile and not options.external_ca:
|
|
|
|
parser.error(
|
|
|
|
"You cannot specify --external-ca-profile "
|
|
|
|
"without --external-ca")
|
2017-07-25 02:03:36 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
return safe_options, options
|
2011-06-17 15:47:39 -05:00
|
|
|
|
2014-03-18 10:23:30 -05:00
|
|
|
|
2017-05-03 03:05:25 -05:00
|
|
|
def _get_dirman_password(password=None, unattended=False):
|
2017-05-03 03:16:13 -05:00
|
|
|
# sys.exit() is used on purpose, because otherwise user is advised to
|
|
|
|
# uninstall the component, even though it is not needed
|
2017-05-03 03:05:25 -05:00
|
|
|
if not password:
|
|
|
|
if unattended:
|
|
|
|
sys.exit('Directory Manager password required')
|
2017-05-03 03:16:13 -05:00
|
|
|
password = installutils.read_password(
|
|
|
|
"Directory Manager (existing master)", confirm=False,
|
|
|
|
validate=False)
|
|
|
|
try:
|
|
|
|
installutils.validate_dm_password_ldap(password)
|
|
|
|
except ValueError:
|
|
|
|
sys.exit("Directory Manager password is invalid")
|
|
|
|
|
2017-05-03 03:05:25 -05:00
|
|
|
return password
|
2014-03-18 10:23:30 -05:00
|
|
|
|
2011-06-17 15:47:39 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
def install_replica(safe_options, options):
|
2016-12-20 04:21:10 -06:00
|
|
|
if options.ca_subject:
|
|
|
|
sys.exit("--ca-subject cannot be used when installing a CA replica")
|
|
|
|
if options.subject_base:
|
|
|
|
sys.exit("--subject-base cannot be used when installing a CA replica")
|
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
# Check if we have admin creds already, otherwise acquire them
|
|
|
|
check_creds(options, api.env.realm)
|
2011-09-27 10:44:20 -05:00
|
|
|
|
2011-06-17 15:47:39 -05:00
|
|
|
# get the directory manager password
|
2017-05-03 03:05:25 -05:00
|
|
|
dirman_password = _get_dirman_password(
|
|
|
|
options.password, options.unattended)
|
2011-06-17 15:47:39 -05:00
|
|
|
|
2017-10-30 02:05:56 -05:00
|
|
|
# Run ipa-certupdate to ensure we have the CA cert. This is
|
|
|
|
# necessary if the admin has just promoted the topology from
|
|
|
|
# CA-less to CA-ful, and ipa-certupdate has not been run yet.
|
2017-11-30 19:27:26 -06:00
|
|
|
ipa_certupdate.run_with_args(api)
|
2017-10-30 02:05:56 -05:00
|
|
|
|
|
|
|
# CertUpdate restarts DS causing broken pipe on the original
|
|
|
|
# connection, so reconnect the backend.
|
|
|
|
api.Backend.ldap2.disconnect()
|
|
|
|
api.Backend.ldap2.connect()
|
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
config = ReplicaConfig()
|
|
|
|
config.ca_host_name = None
|
|
|
|
config.realm_name = api.env.realm
|
|
|
|
config.host_name = api.env.host
|
|
|
|
config.domain_name = api.env.domain
|
|
|
|
config.dirman_password = dirman_password
|
|
|
|
config.ca_ds_port = 389
|
|
|
|
config.top_dir = tempfile.mkdtemp("ipa")
|
|
|
|
config.dir = config.top_dir
|
|
|
|
cafile = paths.IPA_CA_CRT
|
2015-08-20 16:10:23 -05:00
|
|
|
|
2014-03-18 10:23:30 -05:00
|
|
|
global REPLICA_INFO_TOP_DIR
|
|
|
|
REPLICA_INFO_TOP_DIR = config.top_dir
|
2011-06-17 15:47:39 -05:00
|
|
|
config.setup_ca = True
|
|
|
|
|
2015-08-20 16:10:23 -05:00
|
|
|
if config.subject_base is None:
|
2016-10-27 03:31:45 -05:00
|
|
|
attrs = api.Backend.ldap2.get_ipa_config()
|
2015-08-20 16:10:23 -05:00
|
|
|
config.subject_base = attrs.get('ipacertificatesubjectbase')[0]
|
|
|
|
|
2016-10-24 06:09:11 -05:00
|
|
|
if config.ca_host_name is None:
|
2018-07-12 07:37:18 -05:00
|
|
|
config.ca_host_name = find_providing_server(
|
|
|
|
'CA', api.Backend.ldap2, [api.env.ca_host]
|
|
|
|
)
|
2012-11-19 09:32:28 -06:00
|
|
|
|
2015-06-08 00:23:56 -05:00
|
|
|
options.realm_name = config.realm_name
|
|
|
|
options.domain_name = config.domain_name
|
|
|
|
options.dm_password = config.dirman_password
|
|
|
|
options.host_name = config.host_name
|
2018-04-26 05:06:36 -05:00
|
|
|
options.ca_host_name = config.ca_host_name
|
2015-12-09 01:18:21 -06:00
|
|
|
if os.path.exists(cafile):
|
|
|
|
options.ca_cert_file = cafile
|
|
|
|
else:
|
|
|
|
options.ca_cert_file = None
|
2011-08-17 14:36:18 -05:00
|
|
|
|
2015-06-08 00:23:56 -05:00
|
|
|
ca.install_check(True, config, options)
|
2018-04-26 05:06:36 -05:00
|
|
|
|
|
|
|
custodia = custodiainstance.get_custodia_instance(
|
|
|
|
options, custodiainstance.CustodiaModes.CA_PEER)
|
|
|
|
ca.install(True, config, options, custodia=custodia)
|
2012-08-15 21:53:51 -05:00
|
|
|
|
2014-03-18 10:23:30 -05:00
|
|
|
|
2014-06-16 03:41:57 -05:00
|
|
|
def install_master(safe_options, options):
|
2017-05-03 03:05:25 -05:00
|
|
|
dm_password = _get_dirman_password(
|
|
|
|
options.password, options.unattended)
|
2014-06-16 03:41:57 -05:00
|
|
|
|
2015-06-08 00:23:56 -05:00
|
|
|
options.realm_name = api.env.realm
|
|
|
|
options.domain_name = api.env.domain
|
|
|
|
options.dm_password = dm_password
|
|
|
|
options.host_name = api.env.host
|
2016-11-30 00:26:15 -06:00
|
|
|
|
|
|
|
if not options.subject_base:
|
2017-01-30 06:25:04 -06:00
|
|
|
options.subject_base = str(
|
|
|
|
installutils.default_subject_base(api.env.realm))
|
2016-11-16 04:49:36 -06:00
|
|
|
if not options.ca_subject:
|
2017-01-30 06:25:04 -06:00
|
|
|
options.ca_subject = str(
|
|
|
|
installutils.default_ca_subject_dn(options.subject_base))
|
2016-11-16 04:49:36 -06:00
|
|
|
|
|
|
|
try:
|
|
|
|
ca.subject_validator(ca.VALID_SUBJECT_BASE_ATTRS, options.subject_base)
|
|
|
|
except ValueError as e:
|
2017-03-15 02:47:46 -05:00
|
|
|
sys.exit("Subject base: {}".format(e))
|
2016-11-16 04:49:36 -06:00
|
|
|
try:
|
|
|
|
ca.subject_validator(ca.VALID_SUBJECT_ATTRS, options.ca_subject)
|
|
|
|
except ValueError as e:
|
2017-03-15 02:47:46 -05:00
|
|
|
sys.exit("CA subject: {}".format(e))
|
2015-06-08 00:23:56 -05:00
|
|
|
|
|
|
|
ca.install_check(True, None, options)
|
2017-11-28 01:55:59 -06:00
|
|
|
|
|
|
|
ca.print_ca_configuration(options)
|
|
|
|
print()
|
|
|
|
|
|
|
|
if not options.unattended:
|
|
|
|
if not ipautil.user_input(
|
|
|
|
"Continue to configure the CA with these values?", False):
|
|
|
|
sys.exit("Installation aborted")
|
|
|
|
|
2018-04-26 05:06:36 -05:00
|
|
|
# No CA peer available yet.
|
|
|
|
custodia = custodiainstance.get_custodia_instance(
|
2018-09-10 09:19:24 -05:00
|
|
|
options, custodiainstance.CustodiaModes.FIRST_MASTER)
|
2018-04-26 05:06:36 -05:00
|
|
|
ca.install(True, None, options, custodia=custodia)
|
2014-06-16 03:41:57 -05:00
|
|
|
|
2017-10-31 02:20:15 -05:00
|
|
|
# Run ipa-certupdate to add the new CA certificate to
|
|
|
|
# certificate databases on this server.
|
|
|
|
logger.info("Updating certificate databases.")
|
2017-11-30 19:27:26 -06:00
|
|
|
ipa_certupdate.run_with_args(api)
|
2014-03-18 10:23:30 -05:00
|
|
|
|
2018-04-26 05:06:36 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
def install(safe_options, options):
|
2015-12-10 01:17:11 -06:00
|
|
|
with ipautil.private_ccache():
|
|
|
|
ccache = os.environ['KRB5CCNAME']
|
|
|
|
|
2016-11-23 10:40:47 -06:00
|
|
|
kinit_keytab(
|
2015-12-10 01:17:11 -06:00
|
|
|
'host/{env.host}@{env.realm}'.format(env=api.env),
|
|
|
|
paths.KRB5_KEYTAB,
|
|
|
|
ccache)
|
|
|
|
|
2018-07-12 07:37:18 -05:00
|
|
|
ca_host = find_providing_server('CA', api.Backend.ldap2)
|
|
|
|
|
2015-12-10 01:17:11 -06:00
|
|
|
if ca_host is None:
|
|
|
|
install_master(safe_options, options)
|
|
|
|
else:
|
2018-09-10 09:19:24 -05:00
|
|
|
install_replica(safe_options, options)
|
2015-12-10 01:17:11 -06:00
|
|
|
|
|
|
|
|
2014-06-16 03:41:57 -05:00
|
|
|
def main():
|
2018-09-10 09:19:24 -05:00
|
|
|
safe_options, options = parse_options()
|
2014-06-16 03:41:57 -05:00
|
|
|
|
|
|
|
if os.geteuid() != 0:
|
|
|
|
sys.exit("\nYou must be root to run this script.\n")
|
|
|
|
|
2015-08-20 16:10:23 -05:00
|
|
|
if not dsinstance.DsInstance().is_configured():
|
|
|
|
sys.exit("IPA server is not configured on this system.\n")
|
|
|
|
|
2016-01-26 06:41:37 -06:00
|
|
|
if (not options.external_cert_files and
|
|
|
|
cainstance.is_ca_installed_locally()):
|
2015-10-23 10:21:01 -05:00
|
|
|
sys.exit("CA is already installed on this host.")
|
|
|
|
|
2016-07-15 09:25:36 -05:00
|
|
|
standard_logging_setup(log_file_name, debug=options.debug)
|
2018-09-10 09:19:24 -05:00
|
|
|
logger.debug("%s was invoked with options: %s",
|
|
|
|
sys.argv[0], safe_options)
|
2017-05-24 09:35:07 -05:00
|
|
|
logger.debug("IPA version %s", version.VENDOR_VERSION)
|
2015-08-20 16:10:23 -05:00
|
|
|
|
|
|
|
# override ra_plugin setting read from default.conf so that we have
|
|
|
|
# functional dogtag backend plugins during CA install
|
2016-11-28 09:24:33 -06:00
|
|
|
api.bootstrap(
|
|
|
|
context='install', confdir=paths.ETC_IPA,
|
|
|
|
in_server=True, ra_plugin='dogtag'
|
|
|
|
)
|
2015-08-20 16:10:23 -05:00
|
|
|
api.finalize()
|
2016-10-27 03:31:45 -05:00
|
|
|
api.Backend.ldap2.connect()
|
2015-12-10 01:17:11 -06:00
|
|
|
domain_level = dsinstance.get_domain_level(api)
|
2018-09-10 09:19:24 -05:00
|
|
|
if domain_level < DOMAIN_LEVEL_1:
|
|
|
|
api.Backend.ldap2.disconnect()
|
|
|
|
sys.exit("Unsupported domain level %d" % domain_level)
|
2018-07-05 17:04:39 -05:00
|
|
|
|
2018-09-10 09:19:24 -05:00
|
|
|
install(safe_options, options)
|
2015-08-20 16:10:23 -05:00
|
|
|
|
2018-07-05 17:04:39 -05:00
|
|
|
# pki-spawn restarts 389-DS, reconnect
|
|
|
|
api.Backend.ldap2.close()
|
|
|
|
api.Backend.ldap2.connect()
|
|
|
|
|
|
|
|
# Enable configured services and update DNS SRV records
|
2019-03-26 07:27:35 -05:00
|
|
|
service.sync_services_state(api.env.host)
|
2018-07-05 17:04:39 -05:00
|
|
|
api.Command.dns_update_system_records()
|
|
|
|
api.Backend.ldap2.disconnect()
|
|
|
|
|
2016-01-14 07:52:15 -06:00
|
|
|
# execute ipactl to refresh services status
|
2018-02-07 10:18:07 -06:00
|
|
|
ipautil.run([paths.IPACTL, 'start', '--ignore-service-failures'],
|
2016-01-14 07:52:15 -06:00
|
|
|
raiseonerr=False)
|
2014-06-16 03:41:57 -05:00
|
|
|
|
2016-10-27 03:31:45 -05:00
|
|
|
|
2012-05-31 07:34:09 -05:00
|
|
|
fail_message = '''
|
|
|
|
Your system may be partly configured.
|
|
|
|
Run /usr/sbin/ipa-server-install --uninstall to clean up.
|
|
|
|
'''
|
2011-06-17 15:47:39 -05:00
|
|
|
|
2012-05-31 07:34:09 -05:00
|
|
|
if __name__ == '__main__':
|
2011-06-17 15:47:39 -05:00
|
|
|
try:
|
2015-08-20 16:10:23 -05:00
|
|
|
installutils.run_script(main, log_file_name=log_file_name,
|
|
|
|
operation_name='ipa-ca-install',
|
|
|
|
fail_message=fail_message)
|
2012-05-31 07:34:09 -05:00
|
|
|
finally:
|
|
|
|
# always try to remove decrypted replica file
|
|
|
|
try:
|
|
|
|
if REPLICA_INFO_TOP_DIR:
|
|
|
|
shutil.rmtree(REPLICA_INFO_TOP_DIR)
|
|
|
|
except OSError:
|
|
|
|
pass
|