DNSSEC: backup and restore opendnssec zone list file

When zone list is not restored after unninstall, this may slow down
enbaling DNSSEC signing for zones and print unwanted
errors into log after new installation.

Related to: https://fedorahosted.org/freeipa/ticket/5273

Reviewed-By: Petr Spacek <pspacek@redhat.com>
This commit is contained in:
Martin Basti 2015-09-01 12:10:00 +02:00
parent 0bcf0c1be9
commit b6435f2cc6

View File

@ -168,6 +168,9 @@ class OpenDNSSECInstance(service.Service):
if not self.fstore.has_file(paths.OPENDNSSEC_KASP_FILE):
self.fstore.backup_file(paths.OPENDNSSEC_KASP_FILE)
if not self.fstore.has_file(paths.OPENDNSSEC_ZONELIST_FILE):
self.fstore.backup_file(paths.OPENDNSSEC_ZONELIST_FILE)
pin_fd = open(paths.DNSSEC_SOFTHSM_PIN, "r")
pin = pin_fd.read()
pin_fd.close()
@ -354,7 +357,8 @@ class OpenDNSSECInstance(service.Service):
paths.IPA_KASP_DB_BACKUP)
for f in [paths.OPENDNSSEC_CONF_FILE, paths.OPENDNSSEC_KASP_FILE,
paths.OPENDNSSEC_KASP_DB, paths.SYSCONFIG_ODS]:
paths.OPENDNSSEC_KASP_DB, paths.SYSCONFIG_ODS,
paths.OPENDNSSEC_ZONELIST_FILE]:
try:
self.fstore.restore_file(f)
except ValueError as error: