[Patch] [Kolab 2.4] kolab-saslauthd crash when no dirsrv

Chloé Desoutter chloe.desoutter at atasta.net
Fri Feb 1 20:24:26 CET 2013


Dear list,

We have noticed that in Kolab 2.4, the kolab-saslauthd daemon exits when 
the dirsrv is not around (for example, during an upgrade or any other 
planned downtime).

This is clearly an improper behavior, as this implies a manual 
intervention on the kolab-saslauthd service.

Our patch proposal changes this behaviour: when there is an LDAPError, 
it waits 10 seconds and retries to run the loop. Hence, the saslauthd 
service stays up even if it fails. A better behavior could be to give 
the user a temporary failure but in the meanwhile our patch works and 
fixes the issue.

This issue has already been talked of in the kolab 2.4 - kolab-saslauthd 
service failed thread. We hope the users will appreciate this patch to 
the saslauthd/__init__.py program.

Yours sincerely,

-- 
Chloé Desoutter
ATASTANET
-------------- next part --------------
--- saslauthd/__init__.py       2013-02-01 20:13:30.047432454 +0100
+++ saslauthd2/__init__.py      2013-02-01 20:13:15.496431454 +0100
@@ -35,6 +35,7 @@

 import pykolab

+from ldap import LDAPError
 from pykolab.auth import Auth
 from pykolab.constants import *
 from pykolab.translate import _
@@ -96,6 +97,11 @@
             exitcode = 1
             traceback.print_exc()
             log.error(_("Type Error: %s") % e)
+  # retry if failure (atasta patch)
+        except LDAPError, e:
+            log.error(_("dirsrv is not around... waiting"))
+            time.sleep(10)
+            self.run()
         except:
             exitcode = 2
             traceback.print_exc()


More information about the users mailing list