summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-upgradeconfig
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2013-01-15 16:33:22 +0100
committerMartin Kosek <mkosek@redhat.com>2013-01-15 16:35:41 +0100
commit476aacd69963dd94de3af3d640fca783d77b4eb8 (patch)
treebb0ffa1920dff73fc24fa40773f535d48828bc16 /install/tools/ipa-upgradeconfig
parented849639272acf0aed44935591ba525ec1348d59 (diff)
downloadfreeipa-476aacd69963dd94de3af3d640fca783d77b4eb8.tar.gz
freeipa-476aacd69963dd94de3af3d640fca783d77b4eb8.tar.xz
freeipa-476aacd69963dd94de3af3d640fca783d77b4eb8.zip
Upgrade process should not crash on named restart
When either dirsrv or krb5kdc is down, named service restart in ipa-upgradeconfig will fail and cause a crash of the whole upgrade process. Rather only report a failure to restart the service and continue with the upgrade as it does not need the named service running. Do the same precaution for pki-ca service restart. https://fedorahosted.org/freeipa/ticket/3350
Diffstat (limited to 'install/tools/ipa-upgradeconfig')
-rw-r--r--install/tools/ipa-upgradeconfig11
1 files changed, 9 insertions, 2 deletions
diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig
index 0130fc14b..f672bbd8c 100644
--- a/install/tools/ipa-upgradeconfig
+++ b/install/tools/ipa-upgradeconfig
@@ -706,12 +706,19 @@ def main():
if changed_psearch or changed_autoincrement:
# configuration has changed, restart the name server
root_logger.info('Changes to named.conf have been made, restart named')
- bindinstance.BindInstance(fstore).restart()
+ bind = bindinstance.BindInstance(fstore)
+ try:
+ bind.restart()
+ except ipautil.CalledProcessError, e:
+ root_logger.error("Failed to restart %s: %s", bind.service_name, e)
ca_restart = ca_restart or enable_certificate_renewal(ca) or upgrade_ipa_profile(ca, api.env.domain, fqdn)
if ca_restart:
root_logger.info('pki-ca configuration changed, restart pki-ca')
- ca.restart(dogtag.configured_constants().PKI_INSTANCE_NAME)
+ try:
+ ca.restart(dogtag.configured_constants().PKI_INSTANCE_NAME)
+ except ipautil.CalledProcessError, e:
+ root_logger.error("Failed to restart %s: %s", ca.service_name, e)
if __name__ == '__main__':
installutils.run_script(main, operation_name='ipa-upgradeconfig')