Hi, Drops the code from ipa-server-install, ipa-dns-install and the BindInstance itself. Also changed ipa-upgradeconfig script so that it does not set zone_refresh to 0 on upgrades, as the option is deprecated, but rather removes it altogether.
https://fedorahosted.org/freeipa/ticket/3632 Tomas
From 7afe2861a85ec18ec19a7dbf47e8ba1da9ff18de Mon Sep 17 00:00:00 2001 From: Tomas Babej <tba...@redhat.com> Date: Mon, 3 Jun 2013 14:37:20 +0200 Subject: [PATCH] Remove support for IPA deployments with no persistent search Drops the code from ipa-server-install, ipa-dns-install and the BindInstance itself. Also changed ipa-upgradeconfig script so that it does not set zone_refresh to 0 on upgrades, as the option is deprecated. https://fedorahosted.org/freeipa/ticket/3632 --- install/share/bind.named.conf.template | 1 - install/tools/ipa-dns-install | 14 -------------- install/tools/ipa-server-install | 18 ------------------ install/tools/ipa-upgradeconfig | 3 ++- install/tools/man/ipa-dns-install.1 | 6 ------ install/tools/man/ipa-server-install.1 | 6 ------ ipaserver/install/bindinstance.py | 7 ++----- 7 files changed, 4 insertions(+), 51 deletions(-) diff --git a/install/share/bind.named.conf.template b/install/share/bind.named.conf.template index e4ce6058399e8d9a1f112f55907e060075dff00b..f78e18b5fd1d44e4d75d8b412994f2810ede8d97 100644 --- a/install/share/bind.named.conf.template +++ b/install/share/bind.named.conf.template @@ -44,7 +44,6 @@ dynamic-db "ipa" { arg "auth_method sasl"; arg "sasl_mech GSSAPI"; arg "sasl_user DNS/$FQDN"; - arg "zone_refresh $ZONE_REFRESH"; arg "psearch $PERSISTENT_SEARCH"; arg "serial_autoincrement $SERIAL_AUTOINCREMENT"; }; diff --git a/install/tools/ipa-dns-install b/install/tools/ipa-dns-install index e12a0465ca2d09a6a8d25157a737f620f3ff4b1a..bc430c1e5e87f66d3d0db94b850c578f00dd798a 100755 --- a/install/tools/ipa-dns-install +++ b/install/tools/ipa-dns-install @@ -55,13 +55,6 @@ def parse_options(): # this option name has been deprecated, persistent search has been enabled by default parser.add_option("--zone-notif", dest="zone_notif", action="store_true", default=False, help=SUPPRESS_HELP) - parser.add_option("--no-persistent-search", dest="persistent_search", - default=True, action="store_false", - help="Do not enable persistent search feature in the name server") - parser.add_option("--zone-refresh", dest="zone_refresh", - default=0, type="int", - help="When set to non-zero the name server will use DNS zone " - "detection based on polling instead of a persistent search") parser.add_option("--no-serial-autoincrement", dest="serial_autoincrement", default=True, action="store_false", help="Do not enable SOA serial autoincrement") @@ -80,11 +73,6 @@ 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") - elif options.zone_refresh > 0: - options.persistent_search = False # mutually exclusive features - if options.zone_notif: print >>sys.stderr, "WARNING: --zone-notif option is deprecated and has no effect" @@ -232,8 +220,6 @@ def main(): 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, - persistent_search=options.persistent_search, serial_autoincrement=options.serial_autoincrement) bind.create_instance() diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install index 62adbd5bc5183793f3371e46e276b9ad20077b84..f0a0fd754558d3503532be3bf6d92773d61d1cff 100755 --- a/install/tools/ipa-server-install +++ b/install/tools/ipa-server-install @@ -209,13 +209,6 @@ def parse_options(): # this option name has been deprecated, persistent search has been enabled by default dns_group.add_option("--zone-notif", dest="zone_notif", action="store_true", default=False, help=SUPPRESS_HELP) - dns_group.add_option("--no-persistent-search", dest="persistent_search", - default=True, action="store_false", - help="Do not enable persistent search feature in the name server") - dns_group.add_option("--zone-refresh", dest="zone_refresh", - default=0, type="int", - help="When set to non-zero the name server will use DNS zone " - "detection based on polling instead of a persistent search") dns_group.add_option("--no-host-dns", dest="no_host_dns", action="store_true", default=False, help="Do not use DNS for hostname lookup during installation") @@ -321,15 +314,6 @@ def parse_options(): #Automatically disable pkinit w/ dogtag until that is supported options.setup_pkinit = False - if options.zone_refresh < 0: - parser.error("negative numbers not allowed for --zone-refresh") - elif options.zone_refresh > 0: - options.persistent_search = False # mutually exclusive features - - if options.serial_autoincrement and not options.persistent_search: - parser.error('persistent search feature is required for ' - 'DNS SOA serial autoincrement') - if options.zone_notif: print >>sys.stderr, "WARNING: --zone-notif option is deprecated and has no effect" @@ -1127,8 +1111,6 @@ def main(): bind = bindinstance.BindInstance(fstore, dm_password) bind.setup(host_name, ip_address, realm_name, domain_name, dns_forwarders, options.conf_ntp, reverse_zone, zonemgr=options.zonemgr, - zone_refresh=options.zone_refresh, - persistent_search=options.persistent_search, serial_autoincrement=options.serial_autoincrement, ca_configured=setup_ca) if options.setup_dns: diff --git a/install/tools/ipa-upgradeconfig b/install/tools/ipa-upgradeconfig index 8e9357f20fe7c9a88908def6a2e3b2104f07d73a..569d2d1ccbddf7c0888de2ca43a1fde88e5a1939 100644 --- a/install/tools/ipa-upgradeconfig +++ b/install/tools/ipa-upgradeconfig @@ -354,7 +354,8 @@ def named_enable_psearch(): if not sysupgrade.get_upgrade_state('named.conf', 'psearch_enabled'): if psearch != "yes": try: - bindinstance.named_conf_set_directive('zone_refresh', 0) + # Remove zone_refresh from configuration rather then set it to 0 + bindinstance.named_conf_set_directive('zone_refresh', None) bindinstance.named_conf_set_directive('psearch', 'yes') except IOError, e: root_logger.error('Cannot enable psearch in %s: %s', diff --git a/install/tools/man/ipa-dns-install.1 b/install/tools/man/ipa-dns-install.1 index b0bdca94f4aea4a17fecc3362a92a9885bbafed0..646601eecaded0d8490bb41945f4bd83ee81c087 100644 --- a/install/tools/man/ipa-dns-install.1 +++ b/install/tools/man/ipa-dns-install.1 @@ -49,12 +49,6 @@ Do not create new reverse DNS zone. If used on a replica and a reverse DNS zone \fB\-\-zonemgr\fR The e\-mail address of the DNS zone manager. Defaults to hostmaster@DOMAIN .TP -\fB\-\-no\-persistent\-search\fR -Do not enable persistent search mechanism for updating the list of DNS zones in the name server. When persistent search is disabled and \fB\-\-zone\-refresh\fR option is not set to non-zero value, new zones won't be resolvable until the name server is reloaded. -.TP -\fB\-\-zone\-refresh=\fIZONE_REFRESH\fR -When set to non-zero value, persistent search zone update mechanism will be disabled and the name server will use a polling mechanism to load new DNS zones every \fIZONE_REFRESH\fR seconds. -.TP \fB\-\-no\-serial\-autoincrement\fR Do not enable SOA serial autoincrement feature. SOA serial will have to be updated automatically or other DNS features like zone transfer od DNSSEC will not function properly. This feature requires persistent search zone update mechanism. .TP diff --git a/install/tools/man/ipa-server-install.1 b/install/tools/man/ipa-server-install.1 index 59219c14727c5a3062d06d5ef02eb0eebdc9c4f2..5f81cec94afa241449c5d7dbde573d0c2c687d71 100644 --- a/install/tools/man/ipa-server-install.1 +++ b/install/tools/man/ipa-server-install.1 @@ -146,12 +146,6 @@ Do not create reverse DNS zone \fB\-\-zonemgr\fR The e\-mail address of the DNS zone manager. Defaults to hostmaster@DOMAIN .TP -\fB\-\-no\-persistent\-search\fR -Do not enable persistent search mechanism for updating the list of DNS zones in the name server. When persistent search is disabled and \fB\-\-zone\-refresh\fR option is not set to non-zero value, new zones won't be resolvable until the name server is reloaded. -.TP -\fB\-\-zone\-refresh=\fIZONE_REFRESH\fR -When set to non-zero value, persistent search zone update mechanism will be disabled and the name server will use a polling mechanism to load new DNS zones every \fIZONE_REFRESH\fR seconds. -.TP \fB\-\-no\-host\-dns\fR Do not use DNS for hostname lookup during installation .TP diff --git a/ipaserver/install/bindinstance.py b/ipaserver/install/bindinstance.py index ac86e9e7d5713172772b7868233cfa7da91a9fab..5d083deec0509dca617dc5f8c6f957c5c0a4f811 100644 --- a/ipaserver/install/bindinstance.py +++ b/ipaserver/install/bindinstance.py @@ -463,8 +463,7 @@ class BindInstance(service.Service): def setup(self, fqdn, ip_address, realm_name, domain_name, forwarders, ntp, reverse_zone, named_user="named", zonemgr=None, - zone_refresh=0, persistent_search=True, serial_autoincrement=True, - ca_configured=None): + serial_autoincrement=True, ca_configured=None): self.named_user = named_user self.fqdn = fqdn self.ip_address = ip_address @@ -475,8 +474,7 @@ class BindInstance(service.Service): self.suffix = ipautil.realm_to_suffix(self.realm) self.ntp = ntp self.reverse_zone = reverse_zone - self.zone_refresh = zone_refresh - self.persistent_search = persistent_search + self.persistent_search = True self.serial_autoincrement = serial_autoincrement self.ca_configured = ca_configured @@ -607,7 +605,6 @@ class BindInstance(service.Service): SUFFIX=self.suffix, OPTIONAL_NTP=optional_ntp, ZONEMGR=self.zonemgr, - ZONE_REFRESH=self.zone_refresh, IPA_CA_RECORD=ipa_ca, PERSISTENT_SEARCH=boolean_var['persistent_search'], SERIAL_AUTOINCREMENT=boolean_var['serial_autoincrement'],) -- 1.8.1.4
_______________________________________________ Freeipa-devel mailing list Freeipa-devel@redhat.com https://www.redhat.com/mailman/listinfo/freeipa-devel