fix kolabd crashing on startup

Michael kolab983 at der-he.de
Wed Nov 13 19:12:37 CET 2013


Hi,

I'm using Kolab 3.1 from:
deb-src http://obs.kolabsys.com:82/Kolab:/3.1/Debian_7.0/ ./
deb-src http://obs.kolabsys.com:82/Kolab:/3.1:/Updates/Debian_7.0/ ./
Build date: 11-Nov-2013

kolabd/kolab-server is crashing if there's no dirsrv/389 online.
For me that's the case nearly at every system-boot because kolabd apparently 
starts faster than 389 can initialise. 

Maybe there are better places to fix this, but I've added the following to
/usr/lib/python2.7/dist-packages/kolabd/__init__.py:
#################
--- __init__.py.old	2013-10-16 10:30:18.000000000 +0000
+++ __init__.py	2013-11-13 17:48:48.807193716 +0000
@@ -227,12 +227,20 @@
             try:
                 domains = primary_auth.list_domains()
             except:
+                log.debug(_("sleeping..."), level=8)
                 time.sleep(60)
                 continue
 
             # domains now is a list of tuples, we want the primary_domains
             primary_domains = []
-            for primary_domain in list(set(domains.values())):
+            try:
+                primary_domain_list = list(set(domains.values()))
+            except TypeError, te:
+                log.debug(_("sleeping..."), level=8)
+                time.sleep(60)
+                continue
+            
+            for primary_domain in primary_domain_list:
                 primary_domains.append(primary_domain)
 
             # Now we can check if any changes happened.
#################

With this it works for me, kolabd waits for dirsrv to startup.

Sorry for not using pull requests as Timotheus and Torsten suggested.
I haven't played with pull requests yet. Would it be possible 
here too or only in case of fixes for the documentation?

Regards
Michael


More information about the users mailing list