Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing user associations are not flushed #8

Open
h-homma opened this issue Aug 29, 2019 · 0 comments · May be fixed by #11
Open

Existing user associations are not flushed #8

h-homma opened this issue Aug 29, 2019 · 0 comments · May be fixed by #11

Comments

@h-homma
Copy link

h-homma commented Aug 29, 2019

Environment:

CentOS 7.6
Dovecot 2.2.36

Problem description:

When a server goes down, HOST-DOWN and HOST-FLUSH commands are issued in succession, but existing user associations are often not flushed.

When issued immediately after the first command, the second command may not be processed:

[centos@mail11 ~]$ sudo doveadm director status -a /var/run/dovecot-director/director-admin
mail server ip tag vhosts state state changed       users
192.168.250.30     100    up    -                   1
192.168.251.30     100    up    2019-08-29 19:05:14 1
[centos@mail11 ~]$ sudo nc -U /var/run/dovecot-director/director-admin -c '\
> echo -en "VERSION\tdirector-doveadm\t1\t0\n"
> read response; echo "$response" > /dev/tty
> echo -en "HOST-DOWN\t192.168.251.30\n"
> echo -en "HOST-FLUSH\t192.168.251.30\n"'
VERSION director-doveadm        1       0
[centos@mail11 ~]$ sudo doveadm director status -a /var/run/dovecot-director/director-admin
mail server ip tag vhosts state state changed       users
192.168.250.30     100    up    -                   1
192.168.251.30     100    down  2019-08-29 19:05:34 1

On the other hand, the second command seems to always be processed when issued after receiving 'OK' response for the first command:

[centos@mail11 ~]$ sudo doveadm director status -a /var/run/dovecot-director/director-admin
mail server ip tag vhosts state state changed       users
192.168.250.30     100    up    -                   1
192.168.251.30     100    up    2019-08-29 19:05:44 1
[centos@mail11 ~]$ sudo nc -U /var/run/dovecot-director/director-admin -c '\
> echo -en "VERSION\tdirector-doveadm\t1\t0\n"
> read response; echo "$response" > /dev/tty
> echo -en "HOST-DOWN\t192.168.251.30\n"
> read response; echo "$response" > /dev/tty
> echo -en "HOST-FLUSH\t192.168.251.30\n"
> read response; echo "$response" > /dev/tty'
VERSION director-doveadm        1       0
OK
OK
[centos@mail11 ~]$ sudo doveadm director status -a /var/run/dovecot-director/director-admin
mail server ip tag vhosts state state changed       users
192.168.250.30     100    up    -                   2
192.168.251.30     100    down  2019-08-29 19:13:08 0

I think command responses should always be received and checked for reliable operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant