bcb4e51a409d94ae670de96afb8483a4f7855294 |
|
01-Jan-2018 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2018. |
14660f677e16a5c36f3c43e9e64f5e021fda627b |
|
25-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Don't send USERs in handshake that were already sent between handshake
If the user was refreshed since the handshake was started, it means that
the same user was already sent to the other side (added to the stream
immediately after it was received/handled). There's no need to send it
again.
This fixes a potentally infinite handshake when users are rapidly changing
and the handshake iterator never sees the end of the list. (Each refreshed
user is moved to the end of the list, so handshaking can keep sending the
same user over and over again.) |
b3e36790ca9e16d022118012b46ed50f73a45046 |
|
26-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Avoid USER loops when ring latency is over 1 second
Do this by adding a timestamp parameter to USER events. This way if it
takes over 1 second for the USER event to traverse the ring, it won't get
into an infinite loop getting the user updated over and over again. |
d5967394396acaa4aaa249ea973423aa5b9c38ed |
|
16-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Make sure a missing right-side connection is always reconnected
This code shouldn't be needed, but add it just to be sure. |
3e0c0a269390de8495e8f6ecaed59a823221480e |
|
07-Nov-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
director: Add kick_callback to director
This callback gets called whenever director has performed
a kick. |
5754fa860405e9af20c38981942f6aa97ce3158d |
|
06-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Show in process title how many users are being kicked. |
6f20cb5225ddc5ec76f4c9bf6505d959270624de |
|
06-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Log an error if login process sends unexpected reply to KICK* commands |
bd4bbe6478a97e3fab77b05257dd1397c7c090ea |
|
06-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Use *_host.ip_str to avoid net_ip2addr() calls |
3dc72a40e457658caa3c033fb6b3418d16e9fd21 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Track show long the last ring sync took. |
eb5809d0666810ff5ba9da188e1e4e2092ee0eea |
|
05-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: When ring is synced, purge any pending "removed" directors
This allows adding a director back to the ring without having to wait for 30
seconds. |
de69258ceb035b1e08301dc70e257bef341dea85 |
|
05-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Rename director_delayed_dir_remove_timeout() to director_hosts_purge_removed()
This allows using it for other purposes without having a confusing name. |
aa7e573b32f014d8736333fe271ea606c5709f82 |
|
05-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix potential panic when director is alone
If director is alone and it can't connect to other directors, it might crash
with:
Panic: file director.c: line 318 (director_set_ring_synced): assertion failed: (!dir->ring_synced) |
b0421c7397be2146988ee3afb5dcc491c01206cc |
|
04-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Allow doveadm director ring remove for the same director
Fixes:
Panic: file doveadm-connection.c: line 859 (doveadm_connection_cmd_run): assertion failed: (conn->dir->right == NULL && conn->dir->left == NULL) |
34642ccff3ad4906cd365d0cb3deaa1e4f16610b |
|
04-Oct-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix tracking user move count when user is freed early
users_moving_count wasn't updated if the user was freed before killing it
finished. This caused "doveadm director flush" to hang while waiting for
the move count to drop to 0, which it never did. Also following flushes
were doing less work in parallel, or possibly even nothing since director
thought there were too many users already being moved. |
0d1b8b6bec79746c5d89d57dd8c1688946bd9237 |
|
19-Sep-2017 |
Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi> |
global: start relying on timeout_remove(NULL) being a no-op
Cleanup performed with the following semantic patch:
@@
expression E;
@@
- if (E != NULL) {
- timeout_remove(&E);
- }
+ timeout_remove(&E); |
ce8d63810932f48176304ed08cd8b7652c4a8add |
|
20-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix flush to kick the user also when all backends are down
The user's host can't change, because there are no other hosts. So add a
new parameter to force the kick anyway. |
68ba222d8a82047c1b85f5ae31ec7758089fdfe8 |
|
18-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Delay calling state_change_callback() after user kick is finished
Otherwise it can get into recursive loop and cause problems. |
f5d82a4b87a9b17894e1869cfe8b1a90afbced59 |
|
18-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix crash when flush is run and all backends are down.
Instead of moving the users elsewhere, just kill them and flush the backend. |
83b9d8afc2776ebf61ddb77b85241f2591ef7f7b |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: When director is removed, notify it before disconnecting
This way the removed director will know that it's been removed, and it
can also more quickly forward the removal to other directors. |
e2fdcdb4ee53ab769123e27997713aaea34910e1 |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Log info line for every incoming/outgoing connection
This can help with debugging problems. |
e9d302dceba09ceefa0aaddf7eafafd760cd1736 |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Cleanup - move code to a new director_log_connect()
Also adds a missing ')' to the log line. |
027f58ea63a1822bbf13d99ee5572e5f8b9e8d8b |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Log info line whenever a director is added/removed from ring
This can help with debugging problems. |
465fb89a877b778f68734f6cc36db9ce2a4a0a71 |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Improve debugging: Log ring desync when there is no right connection |
3a7a0c35c9f827f86fb437e640287f3a467ef692 |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: When logging "ring SYNC lost", include sync seq number in message
This can help with debugging. |
30089b563dd385f9b18835af2c5a47de2b560660 |
|
14-Sep-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
doveadm director ring remove: Wait ring sync before and after removal
This helps mainly with automated tests. |
cdc7ca129c3433d3e4b9d5e90f4c209e4546dfe9 |
|
18-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Add old host's up/down and vhost count parameters to director_flush_socket
The "down" status allows the script to determine whether it should try to
perform any work on the old host. The vhost count may be unnecessary, but
might be useful for some purpose. |
00cc7eb569710722af0e0af652034b9fc22c57df |
|
03-Apr-2017 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
director: Make director_consistent_hashing=yes mandatory |
edaf7b320f860428b5cd3a0847dc0f7689816129 |
|
20-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Add more debug logging for moving & killing users |
47f09f848021d147ab0cc7d75c4f138b40dbff8c |
|
20-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix USER-MOVE getting stuck if a director already uses the correct host |
3638fd7bb3d9b900894eed0bb6296a9c2294c8f6 |
|
20-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Make sure USER-KILLED isn't sent before USER-MOVE
If USER-MOVE was for a user that didn't exist, killing sent USER-KILLED
immediately before the forwarding USER-MOVE. This caused the move to get
stuck, giving errors like:
director: Error: Finishing user 3224731354 move timed out, its state may now be inconsistent (state=waiting-for-everyone) |
7a380e77afc69a81725d410cd67082a37cf140d2 |
|
20-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Add assert to make sure USER-MOVE doesn't change tag |
6ce2e6f7aba7b36649b9d9d599bf59f8519c48d8 |
|
10-Jan-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix assert-crash when flush script takes too long
Fixes:
Panic: file director.c: line 966 (director_user_move_timeout): assertion failed: (user->kill_ctx->kill_state != USER_KILL_STATE_FLUSHING) |
2454dfa32c93c20a8522c6ed42fe057baaac9f9a |
|
01-Jan-2017 |
Stephan Bosch <stephan.bosch@dovecot.fi> |
Updated copyright notices to include the year 2017. |
08b70fe1d49da710db3b924727c9575303374fad |
|
16-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix crash when using director_flush_socket
Broken accidentally when merging b44033e45e9f48f8a6e1ac5905234fec5de6d6cc |
6460420c3843322b3e725d83288a098cbd0edee2 |
|
15-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix USER-KICK and USER-KICK-ALT forwarding
The internal IPC command was prefixed, which caused the remote director
to reject the commands and disconnect:
director(...): Command proxy: Unknown command proxy
director(...): Remote sent invalid protocol data recently, waiting 57 secs before allowing further communication |
078d7671f59bfcedc010b0b9192639c7d87f3e58 |
|
09-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix crash when receiving USER-MOVE for nonexistent user. |
b44033e45e9f48f8a6e1ac5905234fec5de6d6cc |
|
08-Nov-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
director: Keep per-tag directory |
de92873c366becfaea1554642f89b9169d7955e2 |
|
08-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - moved username_hash generation to director.h
It's not really user_directory specific. This is especially important
in the following patches that add per-tag user_directories. It's also not
always known which tag the username_hash refers to, so there can't be
different tag-specific username_hash generators. |
1f7f4294207557edf83171642ef62ce4922ffc9d |
|
08-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - added user director_iterate_users_*() wrappers.
This will shrink the diff for the following changes. |
68d87d8fb8f23ffed031ddfd9c410f3c929777fa |
|
08-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - use temporary users variables
This will shrink the diff for the following changes. |
0f5dc4da3982053036be65190e44bf28a67b1ca2 |
|
02-Nov-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib: API change - var_expand*() now returns error string.
This allows callers to fail properly if the format string is invalid. |
b93ec4e5b569e1216d0c7a6f28cbdccfe4fb32ca |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Send user's old and new backend IPs to flush script.
If user was created due to the user-move, don't execute the flush script
since it wouldn't really have any work to do anyway. |
aad23ef1531748997776e50a5272a2fc8e022f04 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: User move - Don't try to kick user's connections if user wasn't even known. |
3404b66f3fda78955be9b6891ce5f5d6e13ef97a |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - moved user kill startup to its own function.
No functional changes. |
1b7cd57585d8c2f133dd612d2d5d9c775595659f |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Moved all user killing state to struct director_kill_context
This should make it a bit easier to understand the life time of user
killing. It also simplifies code by removing struct
director_user_kill_finish_ctx.
Finally, this already reduces memory usage with 32bit systems, and would
make it possible to reduce also on 64bit systems if timestamp is shrank to
31 bits and weak bit moved after it. I'm not sure if that would be better
for performance though. In any case it would provide free space for 4 extra
bytes if that were needed in future. |
778a9861ee39eb23ec443a03cde832e3e31d7d37 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - rename director_kill_context.self to kill_is_self_initiated |
79ee504bdf920f01e12e28f238799bf2616489df |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - added USER_IS_BEING_KILLED() macro |
c13fce16374a6fa8d127742c527498d38e777789 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - move enum user_kill_state to director.h
This will be needed by following commits |
6af8cc0573832465c621bcd91634e15461e8bf58 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Execute director_flush_socket only from one director.
Having each director do it would be redundant since they're all supposed to
be performing the same flush task to the same backend. |
0874d7a4fa15322318c71291f0134ff7cc49bbb8 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Improve debug logging output. |
fd882f791279d0bb0cbf15ccec75cff9f6b399cc |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix user move hangs when another move is triggered early.
Running "doveadm director flush" before the previous flush hadn't fully
finished could have caused users to hang until their move timeout:
director: Error: Finishing user 3249070169 move timed out, its state may now be inconsistent (state=waiting-for-everyone) |
f9c76559302e6485f59ab0e6050b76fd6d268fee |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Prevent race conditions by adding USER_KILL_STATE_FLUSHING
In theory it's possible that a user is freed during a flush and added back
before flush is finished, possibly even being moved again. This check makes
sure that we don't finish such move unless we're actually at the correct
flushing state. (If there's another flush also running for the user it'll
be ignored.)
This is also useful for logging purposes. |
3c89b4794ac52cc229b2b1dcec2324b490539c30 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: If user move times out, log the state it was in at the time. |
d3bae1f9d2448e5c398145ea250849ec12583845 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Show in process title how many users are being moved. |
3751234328db786e53680f4df21a4d10b446e252 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - Finish user move always in the same function. |
ffedd89747e11373c0dd3a172d3e94e0cf724fd7 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Call state_change_callback on user move timeout. |
9faac59f664d4003d1412278ac8db4aad1c2067c |
|
22-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fix crash handling director_flush_socket when user is freed. |
cf7857bce68a33cdabe88bb15568e21921eb5ac7 |
|
22-Oct-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
director: Support flush socket
This allows specifying an URI to execute
on user kill. It can be of form
exec:/path/to/bin, unix:/path/to/socket or
tcp:ip:port
The location is sent FLUSH username-hash
per killed user. You can execute some
action there, and you are expected to
return '+\nOK\n' as reply once you are
done. |
bfef6891565ff9018ac92add6eae401e9352c657 |
|
10-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
doveadm director kick: Added -f <passdb field> parameter.
This works for all the user_* passdb fields. |
4a4fdb14788aec22dab8f1b91e9523233e5548dc |
|
10-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Escape username when handling USER-KICK.
This could have caused problems if username parameter contained TABs or LFs,
which of course shouldn't normally happen. |
c3a2a487e23a282e59254b82deb9344ed0306bb2 |
|
04-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Throttle user move/kill failure errors after 100/sec.
If it happened to a lot of users, they can take a lot of space in logs. |
f0339f522dc9c8e2e8a29ef9a3f937c431c6bd1b |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: Use only explicit int -> bool conversions
These were checked with a patched clang. |
db623deb12c3566618faba5a35a44ceed83c3dc0 |
|
03-Jun-2016 |
Martti Rannanjärvi <martti.rannanjarvi@dovecot.fi> |
lib: net_get_ip_any[46]() to struct net_ip[46]_any
Also add struct net_ip[46]_loopback. |
6f8d511666b292196f305d40b9e5e8b017c27a3c |
|
24-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Fixed memory leak when killing a user. |
488d92156e431ef201faf75910955588d0b768e3 |
|
24-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Make sure a long-delayed kill reply for user doesn't mess up the state.
This should fix assert-crash:
director: Panic: file director.c: line 690 (director_user_kill_finish_delayed_to): assertion failed: (ctx->user->kill_state == USER_KILL_STATE_DELAY) |
58b8a301b7b36047f10a592751094fbed86d6f0c |
|
24-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Don't re-send SYNC unnecessarily often. |
02c335c23bf5fa225a467c19f2c063fb0dc7b8c3 |
|
12-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: freshen copyright
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-5]/$1-2016/g;s/ (201[0-5]) Dovecot/ $1-2016 Dovecot/' |
a93c909cfa1139226891d198dc6f7a7c98509b49 |
|
11-Dec-2015 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Don't mark the host desynced if director is alone in ring. |
ae32667c54480d329eed994b3defab89cd76c077 |
|
24-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
director: Fixed backend selection when multiple tags were used.
The previous algorithm was causing an uneven load for backends.
This change breaks compatibility with older director servers that were using
tags because of the different selection algorithm. The new director code
refuses to run within a cluster with old directors if tags are used. |
093b42b11c1236a687d3da564b26a324e2189ae6 |
|
23-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
director: Code cleanup - access host->tag via mail_host_get_tag()
In preparation for the following changes. |
87842f621233257b7a7945d994ba931508b34877 |
|
23-Nov-2015 |
Timo Sirainen <tss@iki.fi> |
director: Code cleanup - make most mail_host_*() list parameters unnecessary. |
9de5eb9e1ac3a07c4197a60fdefd412d6cc78eb2 |
|
19-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
director: Remember backends' hostnames and send them in login reply.
This allows login processes to verify the remote server's hostname in SSL
certificate. |
abe29107f5dce932d28a00912d2d75a01021bef1 |
|
12-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
director: Detect if directors' hosts have become desynced by sending hosts_hash in SYNC parameter.
Also fix up such a situation by resending all HOSTs. |
1574df6b0bc965212f1152e480e7a762cdaa8226 |
|
12-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
director: Use mail_hosts_hash() to improve debug log messages. |
8752573c44bcd139ae3ecc6d8e917c2c60bcb89f |
|
10-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
director: Don't become desynced if two directors change the same backend in incompatible ways.
This would have caused "User hash .. is being redirected to two hosts"
errors, which wouldn't easily go away as the directors have a different view
of what hosts currently exist. |
3e10cd470988298dc2b37f548ad03da4d7c11ffa |
|
07-Sep-2015 |
Timo Sirainen <tss@iki.fi> |
director: Added director_user_kick_delay setting.
This replaces the hardcoded 2 seconds delay. This setting specifies how long
to wait for after user has been kicked from all directors before letting the
user login to the new server. This timeout should be large enough that the
user's existing processes in the old backend should be finished. |
009217abb57a24a4076092e8e4e165545747839e |
|
29-Aug-2015 |
Stephan Bosch <stephan@rename-it.nl> |
Changed type of internet port values to in_port_t everywhere.
Created special SET_IN_PORT setting type for internet port values.
Created net_str2port() for parsing internet port values.
Removed several atoi() invocations in the process. |
a5ddfd7a8b473f73135b93d5e081e470a87f0f7e |
|
18-May-2015 |
Timo Sirainen <tss@iki.fi> |
director: Added "up" vs "down" states and doveadm director up/down commands.
These commands are intended to be used by automated watchdogs that detect if
backends are up or down. This way the vhost count doesn't get forgotten
after server goes down. It also means that admin can manually take down a
server by setting its vhost count to 0 without the watchdog automatically
bringing it back up. |
447653aca14335b7096fb2dd2c7103631b336094 |
|
13-May-2015 |
Timo Sirainen <tss@iki.fi> |
director: Improved debug logging about connecting to another director. |
7cb128dc4cae2a03a742f63ba7afee23c78e3af0 |
|
05-Jan-2015 |
Phil Carmody <phil@dovecot.fi> |
global: freshen copyright
Robomatically:
git ls-files | xargs perl -p -i -e 's/(\d+)-201[0-4]/$1-2015/g;s/ (201[0-4]) Dovecot/ $1-2015 Dovecot/'
Happy 2015 everyone!
Signed-off-by: Phil Carmody <phil@dovecot.fi> |
09060303d565e15d54e42b4ef722f9d3c26f5336 |
|
12-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
director: Added support for backend cluster "tags".
This allows using a single director ring for multiple backend clusters. By
default everything has an empty tag. A passdb lookup can return
"director_tag" field containing the wanted tag name. If there aren't any
backend servers with the wanted tag, it's treated the same as if there
aren't any backend servers available (= wait for 30 secs for a backend and
then return temporary failure).
Tags can be added to configuration by adding @tag suffix to IPs/hosts. For
example:
director_mail_servers = 10.0.0.100-10.0.0.110@name1 10.0.0.120@name2
"doveadm director add" can also add tags either with @tag suffix or with -t
parameter. "doveadm director status user@domain" requires giving the user's
correct tag with -t parameter or the results won't be correct (empty tag's
results are shown). Tags can't currently be changed for an existing host
without removing it first. |
eb209d12e3b1cfed564c35cf19fdb1bf7fcc6811 |
|
12-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
director: Added director_consistent_hashing setting.
This should have been the default since the beginning. I didn't thik it was
worth the trouble originally because in theory it shouldn't matter much if
users jump between multiple backends. But this makes caching behavior worse,
especially for systems which are using local cache files. |
56c69b4b17af0b5a2c71705d5edae746f00780b9 |
|
12-Nov-2014 |
Timo Sirainen <tss@iki.fi> |
director: When logging a warning about ring being synced again, log how many seconds it took |
7be1a5530fcb414588fbe90eaed65eff83e84737 |
|
12-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
Removed pointless NULL checks.
Found by Coverity |
36e091dc733c6cd690c5aae6e411e41adb1eca73 |
|
02-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
director: If we detect that a user is being proxied to multiple backends, disconnect wrong connections.
Especially IMAP connections can otherwise stay alive for a long time and
cause problems. |
550d2fe097e95f12e8fa60ef52753ea7fe53d4ea |
|
02-Jun-2014 |
Timo Sirainen <tss@iki.fi> |
doveadm director kick command added.
The kick gets sent to all the proxies within the director ring. |
ab779efe68458cf6fdcaa4f99527685d5563df0a |
|
23-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
director: Fixed handling weak users when there were exactly 2 director servers in the ring. |
a8c5a86d183db25a57bf193c06b41e092ec2e151 |
|
04-Feb-2014 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2014. |
468c28dfb03613ab8d487b5aebc985a969193ace |
|
29-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
director: Avoid infinite SYNC loops if the originating director goes away for a long time. |
5a580c3a38ced62d4bcc95b8ac7c4f2935b5d294 |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Oops :) Update copyrights to 2013 without breaking all .c files. |
cca4ba2a504d70a9fe9fee37f8433997359de52c |
|
02-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2013. |
1df39b899804fd1dbc560f75382364822935c857 |
|
22-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
director: -D parameter now enables extensive debug logging. |
3ee8a7ee6912c7caa4e83d3ce5a5db1590a7ffcd |
|
22-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
director: Don't handle pending requests from all around the code.
I'm not sure if this actually fixes any bugs, but it definitely makes the
state cleaner. |
dff32d11a411a24f3b76003c1ae22c5a960f180e |
|
11-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
director: Improved logging related to disconnections. |
e34d170f8f0e084bd94bfbc1a7085ece67e508df |
|
25-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Make sure we check all the functions' return values. Minor API changes to simplify this.
Checked using a patched clang that adds attribute(warn_unused_result) to all
functions. This commit fixes several error handling mistakes. |
c88275be7fcb92b10f412cecdd6c2ceaae17917e |
|
11-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
director: Fixed working as standalone. |
e4194f4703eeec32b432371ae30fc8f25ab720d8 |
|
19-May-2012 |
Timo Sirainen <tss@iki.fi> |
director: Implemented ability to remove directors from a running ring.
Also added doveadm command for adding a new director to a running ring. |
89d6cd658eabf46e07e40037b0e641ed9be1a2a3 |
|
20-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Try harder to connect to ring before thinking we're alone. |
002f2544421891472dc9aeb79d3abdde6a8ed4c8 |
|
20-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Director ring needs to be set unsynced immediately even when sycning is frozen. |
32a93320fd2b6ada5ac8027166819463c1a007b6 |
|
20-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Removed special (time_t)-1 code, it's not actually needed.
Also this fixes a user refreshing issue. |
4865df74dad010a65ab63734b3ca1349ce38dc57 |
|
19-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Decreased timeout for resending lost SYNC request. |
447bf65ddb82ec279e7386828748ef47e199a6af |
|
19-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Optimized adding users to linked list during handshake. |
8c2b4a45f17a5cb13bb01058ca37798cf48d91ba |
|
09-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Don't communicate with directors that recently sent invalid input.
Track network and protocol failures separately. If a director had sent
invalid protocol data within last 60 seconds, don't try to connect to it and
don't allow it to connect to us. |
ee3362f3b78827a2c9a7e9ddee83f5a429c06213 |
|
09-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Don't try to send the new SYNC parameter to old director versions.
This should allow adding new directors to an old director ring without
anything breaking. Once all directors have upgraded they start using the new
features. |
5f5713d6468dca1acf3d350dd8a33057331f78c5 |
|
03-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Redesigned connection handling and error handling.
Director now accepts all connections from everywhere and syncs them until
the handshaking is finished. At that point it finally decides if this is
a connection that should be used as our left/right connection, or if it
should be disconnected. This should make connecting more reliable,
especially if one of the directors sends broken handshake or has other
trouble. |
377dd19a90436b8f96902af741a3ea130bc3fe75 |
|
02-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Handle all commands during handshake.
Previously the sender might have sent these commands, but the receiver
wouldn't have handled them and instead just disconnected. |
caae18c876f81e261350e4957471efa453c0ea9f |
|
02-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: List of director connections belongs to struct director. |
f64b5bc9e73bedc63ba3c072c286542c29c69e43 |
|
02-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: Changes to PING handling.
Use larger ping timeouts. While waiting for sync keep doing rapid pings
until the sync is finished, not just once. |
42401be443f96c91a20fc976d66ca626fa6e14ec |
|
26-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
director: Avoid crashing if all directors are removed when reconnecting.
There's no way to currently remove directors though, so this couldn't have
actually happened. |
b6b9c99fefbbc662bd9a0006566133c4480bf0e8 |
|
08-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
director: Avoid user getting redirected to different servers near its expiration.
Fixes a problem when user is logging in at the same time on director1 which
thinks the user is expired, and on director2 which thinks the user expires
only in 1 second. |
aa797403d51ff047727b77d64532001d6b6cc21a |
|
07-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
director: Keep track of the highest supported protocol version in the ring. |
5733207dc3ec10e6e5a6e0a8b30fbd1b061062b9 |
|
05-Mar-2012 |
Timo Sirainen <tss@iki.fi> |
Added director_username_hash setting to specify what part of the username is hashed.
The default is "%u" meaning the full username. Another potentially useful
value is "%d" for hashing only the domain (i.e. redirect users from the same
domain always to same server so they can safely access each others'
shared mailboxes). |
5f5870385cff47efd2f58e7892f251cf13761528 |
|
12-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2012. |
433f5c9cc560a8cbff47257513d0bacb1cf250f4 |
|
17-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
director: Added timeout to syncing to make sure we don't hang if it somehow gets lost. |
c4900d31385344bfadaee53a897daeafdb3063d8 |
|
17-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
director: Find director's own IP earlier in init. |
152db3f90f298b7fb2dbbd4276f0fc30a9bc30f6 |
|
10-Jan-2012 |
Timo Sirainen <tss@iki.fi> |
director: If request is timed out, log an error. |
fb35b9f2c80954da842c20d5128b5e506835d93e |
|
08-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
director: Don't explicitly use base_dir. We're already chdired there, use relative paths. |
ac1118842c3d80285e32d2cd53bda3e95e5be217 |
|
24-May-2011 |
Timo Sirainen <tss@iki.fi> |
doveadm proxy: s/kill/kick/ and related internal code changes.
Mainly for consistency, because "doveadm kick" already existed. |
5411e6f71afb0f753cdf831f4da4ee73e928796e |
|
23-May-2011 |
Timo Sirainen <tss@iki.fi> |
director: Changed the "user killed" delay from 12 secs to 2 secs.
It was 12 secs only for testing. |
15ab2452b0220a115f4351ad9d7fd5ec70ae7966 |
|
23-May-2011 |
Timo Sirainen <tss@iki.fi> |
director: Added support for moving user to another server with "doveadm director move". |
4e43828ef88183a0750a8a374b6ba4ecf227c58f |
|
08-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
director: Improved debug/error logging. |
4c20178a7f70bfe43d252e50796013aac1d8c74a |
|
08-Apr-2011 |
Timo Sirainen <tss@iki.fi> |
director: Reset hosts' last_failed timestamps when they're suspected to be working again.
This should fix some problems during director removals and additions. |
2e37d45867d081db150ab78dad303b9077aea24f |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
183bea41fa640dc8117f3eb45ff935cd81377a84 |
|
04-Mar-2011 |
Timo Sirainen <tss@iki.fi> |
Updated copyright notices to include year 2011. |
23e1e4033d311a50253259de8866525980b23227 |
|
08-Jul-2010 |
Timo Sirainen <tss@iki.fi> |
director: Make sure all director connections are deinitialized at exit.
--HG--
branch : HEAD |
0a53eb0283d7ec28c6105f61e118b96fce8ecb95 |
|
24-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
director: Lots of fixes. It should be pretty stable now.
--HG--
branch : HEAD |
883c882ede03123e771e5f1cd1d4fbdbddafd6c2 |
|
18-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
director: Debug logging crashfix.
--HG--
branch : HEAD |
242abe3ad2423776e9cf05e1304eb8fda4831b23 |
|
18-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
director: A lot of fixes.
--HG--
branch : HEAD |
00e7c3010f7da4a49881a7feb05e413af353af0a |
|
17-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
director: Added initial testing framework and some debugging output.
--HG--
branch : HEAD |
5e9bb72de1209cd39fdf3e95bdb26e047cc5594e |
|
20-May-2010 |
Timo Sirainen <tss@iki.fi> |
Added doveadm director flush command for dropping user associations from memory.
This should probably mainly be used for testing.
--HG--
branch : HEAD |
edd318d5866ac3fbc6e8df28fb24a4dfef93c884 |
|
20-May-2010 |
Timo Sirainen <tss@iki.fi> |
doveadm director status user: Show more ways of what user's potential hosts are.
--HG--
branch : HEAD |
cf9d67e4a9bfee31cf3be05244555d51a3d1b9fe |
|
20-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: Code cleanup - keep mail hosts in a struct rather than in static variables.
--HG--
branch : HEAD |
8e1ecc6542da1e14c14e2e59d39dbccdbf68e2b5 |
|
20-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: Fixes to connecting to remote director.
--HG--
branch : HEAD |
4aab01f4eade3d278b61471516c062ce30a84b5f |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: If we logged that we're delaying connections, also log when we continue.
--HG--
branch : HEAD |
a356c4736fe6041142c6096045bc00c15a80af4e |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: Use net_try_bind() to try to find our own IP.
--HG--
branch : HEAD |
34a45b80c8ed18861c6e343fe40adbe360fc6bad |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: Fixed finding the director's own IP in case system has multiple.
--HG--
branch : HEAD |
f263fc4e13ed76c52d250054ed37b865b499d79e |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: Create outgoing connections from our own known IP.
--HG--
branch : HEAD |
4fe3f07477bae6da3fb8d8fa9bab10ab82ada2bd |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
director: If connecting to director fails, try connecting to next one.
--HG--
branch : HEAD |
2670cd577aa57eb9f915a4f4220ae48c9b4fc5fb |
|
19-May-2010 |
Timo Sirainen <tss@iki.fi> |
Added initial implementation of a director process (for NFS users).
There are still some unimplemented features and bugs. Also changing mail
server list doesn't yet make sure that other directors won't assign the
same user to a different server at the same time.
--HG--
branch : HEAD |