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)
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)
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