From: Michal 'vorner' Vaner Date: Fri, 4 Jan 2013 17:30:30 +0000 (+0100) Subject: [2436] Remove the validation from the b10-loadzone X-Git-Tag: bind10-1.0.0-rc-release~99^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8dc51055585e92db23cfb97fd280a10eecf3ff7a;p=thirdparty%2Fkea.git [2436] Remove the validation from the b10-loadzone It is now done in the ZoneLoader in the C++ backend, so don't duplicate the code. --- diff --git a/src/bin/loadzone/loadzone.py.in b/src/bin/loadzone/loadzone.py.in index 294df55e1f..e054d71221 100755 --- a/src/bin/loadzone/loadzone.py.in +++ b/src/bin/loadzone/loadzone.py.in @@ -282,28 +282,6 @@ class LoadZoneRunner: self._zone_class) raise LoadFailure(str(ex)) - def _post_load_checks(self): - '''Perform minimal validity checks on the loaded zone. - - We do this ourselves because the underlying library currently - doesn't do any checks. Once the library support post-load validation - this check should be removed. - - ''' - datasrc_client = DataSourceClient(self._datasrc_type, - self._datasrc_config) - _, finder = datasrc_client.find_zone(self._zone_name) # should succeed - result = finder.find(self._zone_name, RRType.SOA())[0] - if result is not finder.SUCCESS: - self._post_load_warning('zone has no SOA') - result = finder.find(self._zone_name, RRType.NS())[0] - if result is not finder.SUCCESS: - self._post_load_warning('zone has no NS') - - def _post_load_warning(self, msg): - logger.warn(LOADZONE_POSTLOAD_ISSUE, self._zone_name, - self._zone_class, msg) - def _set_signal_handlers(self): signal.signal(signal.SIGINT, self._interrupt_handler) signal.signal(signal.SIGTERM, self._interrupt_handler) @@ -321,7 +299,6 @@ class LoadZoneRunner: total_elapsed_txt = "%.2f" % (time.time() - self.__start_time) logger.info(LOADZONE_DONE, self.__loaded_rrs, self._zone_name, self._zone_class, total_elapsed_txt) - self._post_load_checks() return 0 except BadArgument as ex: logger.error(LOADZONE_ARGUMENT_ERROR, ex) diff --git a/src/bin/loadzone/loadzone_messages.mes b/src/bin/loadzone/loadzone_messages.mes index db792693e9..ca241b3ae0 100644 --- a/src/bin/loadzone/loadzone_messages.mes +++ b/src/bin/loadzone/loadzone_messages.mes @@ -46,14 +46,6 @@ in the zone file. When this happens, the RRs loaded so far are effectively deleted from the zone, and the old version (if exists) will still remain valid for operations. -% LOADZONE_POSTLOAD_ISSUE New version of zone %1/%2 has an issue: %3 -b10-loadzone detected a problem after a successful load of zone: -either or both of SOA and NS records are missing at the zone origin. -In the current implementation the load will not be canceled for such -problems. The operator will need to fix the issues and reload the -zone; otherwise applications (such as b10-auth) that use this data -source will not work as expected. - % LOADZONE_SQLITE3_USING_DEFAULT_CONFIG Using default configuration with SQLite3 DB file %1 The SQLite3 data source is specified as the data source type without a data source configuration. b10-loadzone uses the default