dd19de9b6382c9a47b65df6b2396789df37a19fb |
|
25-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Show number of incoming USERs/sec in ps title |
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. |
05b7b8f14426b5fe5d016940eb5916033f0bc841 |
|
26-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Replace USER command during handshake with "U"
This clearly differentiates the two commands and allows extending the USER
command with new parameters without mixing it up with the handshake-USER. |
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. |
4dc8d682c855ca78db8874e04302e885465c1d65 |
|
06-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Show in process title how many requests are being delayed. |
3dc72a40e457658caa3c033fb6b3418d16e9fd21 |
|
01-Nov-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Track show long the last ring sync took. |
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. |
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. |
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. |
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. |
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. |
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. |
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. |
8cafec427a378daf68c253929232d498509d548c |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Code cleanup - global director is no longer needed. |
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. |
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 |
d3bae1f9d2448e5c398145ea250849ec12583845 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Show in process title how many users are being moved. |
ffedd89747e11373c0dd3a172d3e94e0cf724fd7 |
|
25-Oct-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Call state_change_callback on user move timeout. |
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. |
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. |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
58b8a301b7b36047f10a592751094fbed86d6f0c |
|
24-Mar-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
director: Don't re-send SYNC unnecessarily often. |
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. |
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. |
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. |
ece0a20249ce26208db3415ba2e79423678856f8 |
|
13-May-2015 |
Timo Sirainen <tss@iki.fi> |
director: Include useful statistics in process title. |
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. |
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. |
468c28dfb03613ab8d487b5aebc985a969193ace |
|
29-Jul-2013 |
Timo Sirainen <tss@iki.fi> |
director: Avoid infinite SYNC loops if the originating director goes away for a long time. |
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. |
bdd36cfdba3ff66d25570a9ff568d69e1eb543cf |
|
03-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
Renamed network.[ch] to net.[ch].
The function prefixes already started with net_ instead of network_.
And icecap wants to use network.h for other purpose. :) |
dff32d11a411a24f3b76003c1ae22c5a960f180e |
|
11-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
director: Improved logging related to disconnections. |
4ee00532a265bdfb38539d811fcd12d51210ac35 |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Array API changed: ARRAY_DEFINE(name, type) -> ARRAY(type) name
Easy way to update your existing code:
perl -i -pe 's:ARRAY_DEFINE\(([^,]+), *([^)]+)\);:ARRAY($2) $1;:' **/*.[ch] |
a10ed8c47534b4c6b6bf2711ccfe577e720a47b4 |
|
23-Jun-2012 |
Timo Sirainen <tss@iki.fi> |
Marked functions parameters that are allowed to be NULL. Some APIs were also changed.
The non-obvious APIs where NULL parameter was changed to "" are
master_service_init() and auth_master_user_list_init().
These checks can currently be enabled only on a patched clang:
http://llvm.org/bugs/show_bug.cgi?id=6786 |
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. |
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. |
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. |
caae18c876f81e261350e4957471efa453c0ea9f |
|
02-Apr-2012 |
Timo Sirainen <tss@iki.fi> |
director: List of director connections belongs to struct director. |
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. |
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. |
15ab2452b0220a115f4351ad9d7fd5ec70ae7966 |
|
23-May-2011 |
Timo Sirainen <tss@iki.fi> |
director: Added support for moving user to another server with "doveadm director move". |
0a53eb0283d7ec28c6105f61e118b96fce8ecb95 |
|
24-Jun-2010 |
Timo Sirainen <tss@iki.fi> |
director: Lots of fixes. It should be pretty stable now.
--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 |
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 |
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 |