Tero Saarni
a3abd12729
ITS#9400 Added test case for back-ldap retry failure
2020-11-24 18:47:07 +00:00
Howard Chu
12523b0f29
ITS#9400 back-ldap: fix prev commit
2020-11-24 16:08:29 +00:00
Howard Chu
dbe69684a1
ITS#9404 fix serialNumberAndIssuerCheck
...
Tighten validity checks
2020-11-23 17:14:00 +00:00
Howard Chu
1ea12260d5
ITS#9400 back-ldap: fix retry binds
...
Regression from fix for ITS#7403
2020-11-23 05:14:30 +00:00
Quanah Gibson-Mount
1aef660f0b
ITS#8747 - Regenreate for lloadd
2020-11-20 16:18:15 +00:00
Ondřej Kuzník
8557cc93b7
Add lloadd into our testing regime
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
323bb1d9a4
Handle upstream rejecting a StartTLS exop
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
0abf3f5bc9
Flush cache before calling dispose()
...
This needs to be confirmed:
Location based atomics do not imply a full fence of the same level. So
to get the code in dispose() read the actual data, it seems we need to
initiate a fence.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
dfbed44b3e
Do not accept requests with msgid == 0
...
It is used internally to identify pinned operations and should not be
encountered over the wire.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
dfbf25d579
Honour keepalive settings for upstreams
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
25fff30e39
Let the last thread dispose of pending references
...
If we're idle, there might be objects pending cleanup for the last two
epochs. Unless another thread comes in and checks into a new epoch or we
shut down, they will linger forever.
If one of the objects was a connection, it wouldn't get closed and be
stuck in CLOSE_WAIT state, potentially refusing another ligitimate
connection if its socket address were to match the one we're yet to
close.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
41a74b4689
Introduce the notion of experimental features
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
1f6d8611a3
Implement read throttling when writes backlog
...
Reject operations in such a case with LDAP_BUSY. If read_event feature
is on, just stop reading from the connection. However this could still
result in deadlocks in reasonable situations. Need to figure out better
ways to make it safe and still protect ourselves.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
68b163fca9
Introduce mutex checks
...
Switched off unless thread debugging is on, but still useful for static
analysis.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
62a806b243
Thread error checking
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
1328777a85
Fix a SASL channel-binding leak
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
58d66a3946
Fix race between unlinking a client and processing incoming data
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
959ff07911
Make sure read event is not enabled while upstream_bind is scheduled
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
b2e57148fa
Shorten to one epoch per PDU
...
A full read cycle can take a very long time if the limits are set too
high.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
b49f51879f
Implement client pending operation limits
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
f832024e90
Straighten up client pending op tracking
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
dc1961cb15
Epoch based memory reclamation
...
Similar to the algorithm presented in
https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-579.pdf
Not completely lock-free at the moment. Also the problems with epoch
based memory reclamation are still present - a thread actively observing
an epoch getting stuck will prevent LloadConnections and LloadOperations
being freed, potentially running out of memory.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
aab6af1c4e
Switch to LDAP_OTHER when handling a lost upstream.
...
LDAP_UNAVAILABLE signals "the server is shutting down or a subsystem
necessary to complete the operation is offline", so intelligent clients
tend to infer the connection will not be usable any more, which is not
the case here.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
81ead4a5f4
Fix races with backend_retry
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
c087244265
SASL and proxyauthz tests
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
bd3da7322a
Add TLS tests
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
34ddaa5fc7
Tests for monitoring support
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
78f25a3c91
A failed cn=config ADD needs to be handled
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
4b3d21146b
Introduce SASL support for upstream connections
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
50a021a387
Do not enforce a valid ld in lutil_sasl_interact
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
05e0906f8b
Fix backend starttls= setting being ignored
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
9444dfc991
Simplify pause handling
...
Gets rid of a race where unpause+pause fired in a quick succession would
miss the event_base_loopbreak() call.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
25a4d684fc
Permit lloadd to share slapd TLS context
2020-11-17 17:58:15 +00:00
Nadezhda Ivanova
ef0028e586
Initial implementation of cn=config testing script
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
63efcd63eb
Reuse connection walking in monitor for upstreams too
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
3bd2d7483e
Reuse connection_walk for client matters
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
b4f43ed8e1
Refactor backend reset
...
Reuse the connection walking facility in timeout management.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
638f8a2cbc
Tighten checks on retry management
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
2a813cb06d
Clean up backend_retry and its callers.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
241f65b9e0
Fix a race in managing b_dns_req
2020-11-17 17:58:15 +00:00
Nadezhda Ivanova
f4a2fdd400
Fix a new backend not being operational if added via cn=config
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
00806dd32a
libevent 2.0 support
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
513659c610
Document config behaviour
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
f1ea9da3a0
Reorganise listener support in cn=config and module startup
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
bd7a6f67de
Introduce lload_open_new_listener
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
757c8beda7
Switch to ldap_parse_url_ext
...
This simplifies port parsing in the end. Also pass the url to
ldap_open_listener in anticipation of incremental listener config.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
93d20459f1
Make io-threads modification startup-only
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
db3961f489
Record connect task to allow canceling it
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
6b10c2988e
Record pending DNS resolution to be able to cancel
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
b039e7c1b0
Keep a reference around for the bind task
2020-11-17 17:58:15 +00:00