dovecot-2.2: director: Don't allow doveadm to update backend's s...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Oct 10 15:34:34 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/5939512ff017
changeset: 19288:5939512ff017
user: Timo Sirainen <tss at iki.fi>
date: Sat Oct 10 18:32:56 2015 +0300
description:
director: Don't allow doveadm to update backend's state if the state is already being changed.
diffstat:
src/director/doveadm-connection.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (29 lines):
diff -r 0f9d4f1a083d -r 5939512ff017 src/director/doveadm-connection.c
--- a/src/director/doveadm-connection.c Sat Oct 10 18:32:06 2015 +0300
+++ b/src/director/doveadm-connection.c Sat Oct 10 18:32:56 2015 +0300
@@ -282,6 +282,10 @@
return TRUE;
}
host = mail_host_add_ip(dir->mail_hosts, &ip, tag);
+ } else if (host->desynced) {
+ o_stream_nsend_str(conn->output,
+ "host is already being updated - try again later\n");
+ return TRUE;
}
if (vhost_count != UINT_MAX)
mail_host_set_vhost_count(dir->mail_hosts, host, vhost_count);
@@ -323,7 +327,13 @@
o_stream_nsend_str(conn->output, "NOTFOUND\n");
return TRUE;
}
- if (host->down != down) {
+ if (host->down == down)
+ ;
+ else if (host->desynced) {
+ o_stream_nsend_str(conn->output,
+ "host is already being updated - try again later\n");
+ return TRUE;
+ } else {
mail_host_set_down(conn->dir->mail_hosts, host,
down, ioloop_time);
director_update_host(conn->dir, conn->dir->self_host,
More information about the dovecot-cvs
mailing list