summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-install
diff options
context:
space:
mode:
authorTomas Babej <tbabej@redhat.com>2013-03-26 16:09:24 +0100
committerRob Crittenden <rcritten@redhat.com>2013-04-02 09:44:48 -0400
commitff01a08ffc85c069f37692ad8307bf10e8bd1e29 (patch)
tree238c89091d707dde82e41a7eb2db55467ebd1dd8 /install/tools/ipa-replica-install
parent7b45e33400355df44e75576ef7f70a39d163bf8e (diff)
downloadfreeipa-ff01a08ffc85c069f37692ad8307bf10e8bd1e29.tar.gz
freeipa-ff01a08ffc85c069f37692ad8307bf10e8bd1e29.tar.xz
freeipa-ff01a08ffc85c069f37692ad8307bf10e8bd1e29.zip
Properly handle ipa-replica-install when its zone is not managed by IPA
The ipa-replica-install script tries to add replica's A and PTR records to the master DNS, if master does manage DNS. However, master need not manage replica's zone. Properly handle this use case. https://fedorahosted.org/freeipa/ticket/3496
Diffstat (limited to 'install/tools/ipa-replica-install')
-rwxr-xr-xinstall/tools/ipa-replica-install22
1 files changed, 16 insertions, 6 deletions
diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index af80c1e3e..2c28f37ce 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -302,13 +302,23 @@ def install_dns_records(config, options):
# before our DS server is installed.
with temporary_ldap2_connection(
config.master_host_name, config.dirman_password):
- bind = bindinstance.BindInstance(dm_password=config.dirman_password)
- reverse_zone = bindinstance.find_reverse_zone(config.ip)
+ try:
+ bind = bindinstance.BindInstance(dm_password=config.dirman_password)
+ reverse_zone = bindinstance.find_reverse_zone(config.ip)
+
+ bind.add_master_dns_records(config.host_name, config.ip_address,
+ config.realm_name, config.domain_name,
+ reverse_zone, options.conf_ntp,
+ options.setup_ca)
+ except errors.NotFound, e:
+ root_logger.debug('Replica DNS records could not be added '
+ 'on master: %s', str(e))
+
+ # we should not fail here no matter what
+ except Exception, e:
+ root_logger.info('Replica DNS records could not be added '
+ 'on master: %s', str(e))
- bind.add_master_dns_records(config.host_name, config.ip_address,
- config.realm_name, config.domain_name,
- reverse_zone, options.conf_ntp,
- options.setup_ca)
def check_dirsrv():
(ds_unsecure, ds_secure) = dsinstance.check_ports()