fix(panettone): Automatically reconnect to ldap

Wrap all ldap access in a macro that automatically reconnects and
retries operations that fail due to a connection error, to handle the
case where the ldap server restarts while we still have an open
connection.

Fixes: #44
Change-Id: I4859cf509106e480f97fed17e7f08e0eea909352
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1871
Tested-by: BuildkiteCI
Reviewed-by: eta <eta@theta.eu.org>
This commit is contained in:
Griffin Smith 2020-08-28 18:49:29 -04:00 committed by glittershark
parent 2bc564bd0d
commit 21690c644b
3 changed files with 55 additions and 17 deletions

View file

@ -571,6 +571,8 @@
(comment
(setq hunchentoot:*catch-errors-p* nil)
;; to setup an ssh tunnel to ldap+cheddar for development:
;; ssh -NL 3899:localhost:389 -L 4238:localhost:4238 whitby.tvl.fyi
(start-panettone :port 6161
:ldap-port 3899
:session-secret "session-secret")