Commit Graph

23535 Commits

Author SHA1 Message Date
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
Ondřej Kuzník
0314f95d7f Work around libevent base not waking up on shutdown 2020-11-17 17:58:15 +00:00
Ondřej Kuzník
db939eeb86 Protect operation when abandoning 2020-11-17 17:58:15 +00:00
Ondřej Kuzník
07401e5829 Implement runtime monitor (un)registration
Unregistration is a hack and we shoould either make the subsystems into
an entry (if monitor allows subentry generation) or implement subsystem
unregistration in back-monitor.
2020-11-17 17:58:15 +00:00
Ondřej Kuzník
1ea5ee1f01 Do not unlock upstream without referencing its dying ops 2020-11-17 17:58:15 +00:00
Ondřej Kuzník
b1c098ad76 Module shutdown support 2020-11-17 17:58:15 +00:00
Ondřej Kuzník
05d6aae40f Rework lloadd startup 2020-11-17 17:58:15 +00:00
Ondřej Kuzník
362f16479a Deal with no backends being configured 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
4c355deb3d Record the backend name 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
3a6b399580 Reflect backend URI change in cn=monitor 2020-11-17 17:58:14 +00:00
Nadezhda Ivanova
bace795984 Enable dynamic configuration 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
70ae4af60a Fix interaction of graceful connection closing and SASL bind support 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
d954216f93 Change log level for unsolicited response 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
edfb3d73d6 Fix operation status tracking.
An operation is rejected iff it has to be dropped before we can find an
upstream for it (unless we handle it ourselves, that is). At that point
it is failed unless completed successfully.

This makes a difference for multi-stage binds which alternate between
'failed' (we are waiting on a server response) and 'completed' (server
did what we asked them to, waiting on client to continue).
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
cfe9065824 Introduce infra to handle config changes 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
a7f8f58a63 expose task functions for invalidation 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
bf9f99dd88 Split backend destruction from resetting it 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
7f22bac4ac Introduce a new connection status - gentle shutdown 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
ca646cd02d Fix operation counts
Trying to abandon an operation does not automatically make it completed,
it might have failed already but we're just racing to reach the client
to record that.
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
bea9bfb33d Move op counting to operation_init 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
0011684760 Cleanup sasl_bind_mech resets 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
9bd90a741c Fix a race on bind response processing.
During response processing, an upstream connection could be marked ready
after a different bind had already been allocated to it, thus allowing
two binds to be in progress on the same connection.
2020-11-17 17:58:14 +00:00
Ondřej Kuzník
485a169758 Implement pause handlers 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
db5966f60d More meaningful connection type reporting 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
22818e8583 Module shutdown 2020-11-17 17:58:14 +00:00
Ondřej Kuzník
dab9054794 Rework monitor startup
Takes care of dealing with monitor not present/not configured and fix a
monitor startup issue.
2020-11-17 17:58:14 +00:00
Nadezhda Ivanova
678fa100f7 Convert the load balancer into a backend 2020-11-17 17:58:14 +00:00
Nadezhda Ivanova
7771606984 Use slapd's config.h 2020-11-17 17:58:14 +00:00