Patch 188 catch ldap exceptions to prevent false positive abrt reports

Patch 187 fixes issues with removing root zone

Patches attached.

--
Martin Basti

From baed3cbcc9d4cf1768a7f2eff96e9d0943bfc578 Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Wed, 21 Jan 2015 13:32:44 +0100
Subject: [PATCH] DNSSEC catch ldap exceptions in ipa-dnskeysyncd

Server down exception causes lot of false positive abrt reports.
---
 daemons/dnssec/ipa-dnskeysyncd | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/daemons/dnssec/ipa-dnskeysyncd b/daemons/dnssec/ipa-dnskeysyncd
index c7475bd65ba7ad38af99f2e8c3ae3bc8837f2c9b..e184d88b47ff7c7224c71057807e447e4b5e9e12 100755
--- a/daemons/dnssec/ipa-dnskeysyncd
+++ b/daemons/dnssec/ipa-dnskeysyncd
@@ -102,5 +102,9 @@ while watcher_running:
         filterstr=ldap_url.filterstr
     )
 
-    while ldap_connection.syncrepl_poll(all=1, msgid=ldap_search):
-        pass
+    try:
+        while ldap_connection.syncrepl_poll(all=1, msgid=ldap_search):
+            pass
+    except (ldap.SERVER_DOWN, ldap.CONNECT_ERROR) as e:
+        log.exception('syncrepl_poll: LDAP error (%s)', e)
+        sys.exit(1)
-- 
2.1.0

From b47299085fd04bb8ccc99e47b2a0e33d52fd1e8a Mon Sep 17 00:00:00 2001
From: Martin Basti <mba...@redhat.com>
Date: Wed, 21 Jan 2015 12:19:17 +0100
Subject: [PATCH] DNSSEC: fix root zone dns name conversion

Root zone was represented as '@', which was incorrect. ksmutil did not
accept it.
Now root zone is represented as '.'
---
 ipapython/dnssec/odsmgr.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ipapython/dnssec/odsmgr.py b/ipapython/dnssec/odsmgr.py
index a91b6c553d9ab7364258bd1ca24d236a3994ec6d..ed17351cad4db28caed2623aa4bec145d5bc4414 100644
--- a/ipapython/dnssec/odsmgr.py
+++ b/ipapython/dnssec/odsmgr.py
@@ -145,6 +145,9 @@ class ODSMgr(object):
     def del_ods_zone(self, name):
         # ods-ksmutil blows up if zone name has period at the end
         name = name.relativize(dns.name.root)
+        # detect if name is root zone
+        if name == dns.name.empty:
+            name = dns.name.root
         cmd = ['zone', 'delete', '--zone', str(name)]
         output = self.ksmutil(cmd)
         self.log.info(output)
-- 
2.1.0

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to