diff options
author | Martin Kosek <mkosek@redhat.com> | 2011-08-31 14:42:57 +0200 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-08-31 16:46:12 +0200 |
commit | 6a2dfde086bdda62964a9737a300818d2ab24a4b (patch) | |
tree | 2053bdc0213f0a204e14ffe9f2cb4407ec22a65b /install/tools/ipa-dns-install | |
parent | ca1ca17cb61516dff6933b1b0381b32e1e38d44c (diff) | |
download | freeipa-6a2dfde086bdda62964a9737a300818d2ab24a4b.tar.gz freeipa-6a2dfde086bdda62964a9737a300818d2ab24a4b.tar.xz freeipa-6a2dfde086bdda62964a9737a300818d2ab24a4b.zip |
Let Bind track data changes
Integrate new bind-dyndb-ldap features to automatically track
DNS data changes:
1) Zone refresh
Set --zone-refresh in installation to define number of seconds
between bind-dyndb-ldap polls for new DNS zones. User now
doesn't have to restart name server when a new zone is added.
2) New zone notifications
Use LDAP persistent search mechanism to immediately get
notification when any new DNS zone is added. Use --zone-notif
install option to enable. This option is mutually exclusive
with Zone refresh.
To enable this functionality in existing IPA installations,
update a list of arguments for bind-dyndb-ldap in /etc/named.conf.
An example when zone refresh is disabled and DNS data change
notifications (argument psearch of bind-dyndb-ldap) are enabled:
dynamic-db "ipa" {
...
arg "zone_refresh 0";
arg "psearch yes";
};
This patch requires bind-dyndb-ldap-1.0.0-0.1.b1 or later.
https://fedorahosted.org/freeipa/ticket/826
Diffstat (limited to 'install/tools/ipa-dns-install')
-rwxr-xr-x | install/tools/ipa-dns-install | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install index cf400dd75..09006a200 100755 --- a/install/tools/ipa-dns-install +++ b/install/tools/ipa-dns-install @@ -29,6 +29,7 @@ from ipapython import version from ipapython import ipautil, sysrestore from ipalib import api, errors, util from ipapython.config import IPAOptionParser +from ipalib.constants import DNS_ZONE_REFRESH import krbV import ldap @@ -49,6 +50,14 @@ def parse_options(): default=False, help="Do not create reverse DNS zone") parser.add_option("--zonemgr", dest="zonemgr", help="DNS zone manager e-mail address. Defaults to root") + parser.add_option("--zone-notif", dest="zone_notif", + action="store_true", default=False, + help="Let name server receive notification when a new zone is added." \ + "Zone refresh is turned off when zone notification is enabled") + parser.add_option("--zone-refresh", dest="zone_refresh", + default=DNS_ZONE_REFRESH, type="int", + help="A delay between checks for new DNS zones. Defaults to %d" \ + % DNS_ZONE_REFRESH) parser.add_option("-U", "--unattended", dest="unattended", action="store_true", default=False, help="unattended installation never prompts the user") @@ -64,6 +73,12 @@ def parse_options(): if not options.forwarders and not options.no_forwarders: parser.error("You must specify at least one --forwarder option or --no-forwarders option") + if options.zone_refresh < 0: + parser.error("negative numbers not allowed for --zone-refresh") + + if options.zone_notif: # mutually exclusive features + options.zone_refresh = 0 + return safe_options, options def main(): @@ -179,7 +194,10 @@ def main(): print "Please wait until the prompt is returned." print "" - bind.setup(api.env.host, ip_address, api.env.realm, api.env.domain, dns_forwarders, conf_ntp, reverse_zone, zonemgr=options.zonemgr) + bind.setup(api.env.host, ip_address, api.env.realm, api.env.domain, + dns_forwarders, conf_ntp, reverse_zone, zonemgr=options.zonemgr, + zone_refresh=options.zone_refresh, + zone_notif=options.zone_notif) bind.create_instance() |