Skip to content

Existing user associations are not flushed #8

@h-homma

Description

@h-homma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions