From 7b04b9e603bf6517458cccae7509e99f10c8a0ec Mon Sep 17 00:00:00 2001
From: Martin Basti <mbasti@redhat.com>
Date: Tue, 1 Sep 2015 12:10:00 +0200
Subject: [PATCH] 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>
---
ipaserver/install/opendnssecinstance.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ipaserver/install/opendnssecinstance.py b/ipaserver/install/opendnssecinstance.py
index 0f1af828ea245046330fdfab77db130ca14faba3..c5377d910d8f38a1ea0e05461ecf1b92f05ca2ca 100644
--- a/ipaserver/install/opendnssecinstance.py
+++ b/ipaserver/install/opendnssecinstance.py
@@ -171,6 +171,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()
@@ -357,7 +360,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, error:
--
2.5.1