summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-prepare
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2011-05-27 17:05:45 +0200
committerMartin Kosek <mkosek@redhat.com>2011-05-27 18:00:47 +0200
commit17c3f9e84efcbeb3b5ae1de83d799974de3bb078 (patch)
treec219902aa7d2a98c63ac7605e712c33f59166dc8 /install/tools/ipa-replica-prepare
parent58c1950566f9fb03b61461f40074e47614113194 (diff)
downloadfreeipa-17c3f9e84efcbeb3b5ae1de83d799974de3bb078.tar.gz
freeipa-17c3f9e84efcbeb3b5ae1de83d799974de3bb078.tar.xz
freeipa-17c3f9e84efcbeb3b5ae1de83d799974de3bb078.zip
Fix reverse zone creation in ipa-replica-prepare
When a new reverse zone was created in ipa-replica-prepare (this may happen when a new replica is from different subnet), the master DNS address was corrupted by invalid A/AAAA record. This caused problems for example in installing replica. https://fedorahosted.org/freeipa/ticket/1223
Diffstat (limited to 'install/tools/ipa-replica-prepare')
-rwxr-xr-xinstall/tools/ipa-replica-prepare4
1 files changed, 3 insertions, 1 deletions
diff --git a/install/tools/ipa-replica-prepare b/install/tools/ipa-replica-prepare
index e9122351f..a41ca5121 100755
--- a/install/tools/ipa-replica-prepare
+++ b/install/tools/ipa-replica-prepare
@@ -30,6 +30,7 @@ from ipapython import ipautil
from ipaserver.install import bindinstance, dsinstance, installutils, certs
from ipaserver.install.bindinstance import add_zone, add_reverse_zone, add_rr, add_ptr_rr
from ipaserver.install.replication import check_replication_plugin, enable_replication_version_checking
+from ipaserver.install.installutils import resolve_host
from ipaserver.plugins.ldap2 import ldap2
from ipapython import version
from ipalib import api, errors, util
@@ -427,7 +428,8 @@ def main():
zone = add_zone(domain, nsaddr=options.ip_address)
add_rr(zone, name, "A", options.ip_address)
- add_reverse_zone(options.ip_address)
+ ns_ip_address = resolve_host(api.env.host)
+ add_reverse_zone(options.ip_address, ns_ip_address)
add_ptr_rr(options.ip_address, replica_fqdn)
try: