I've got a couple more issues with the doveadm director interface: 1) If I use "doveadm director remove" to disable a host with active users, the director seems to lose track of users mapped to that host. I guess I would expect it to tear down any active sessions by killing the login proxies, like I'd done 'doveadm direct add HOSTNAME 0 && doveadm director flush HOSTNAME' before removing it? Here's what I see with an active open connection: [root at cc-popmap7 ~]# doveadm director status brandond Current: 10.142.0.179 (expires 2010-07-14 01:26:14) Hashed: 10.142.0.179 Initial config: 10.142.0.161 [root at cc-popmap7 ~]# doveadm director remove 10.142.0.179 [root at cc-popmap7 ~]# doveadm director status brandond Current: not assigned Hashed: 10.142.0.174 Initial config: 10.142.0.161 2) "doveadm director flush" returns the wrong usage: [root at cc-popmap7 ~]# doveadm director flush doveadm director remove [-a <director socket path>] <host> 3) "doveadm director flush" all breaks the ring: [root at cc-popmap7 ~]# doveadm director flush all Jul 14 01:26:33 cc-popmap7 dovecot: director: Error: Director 10.142.0.180:1234/right disconnected Jul 14 01:26:33 cc-popmap7 dovecot: director: Error: Director 10.142.0.180:1234/left disconnected Jul 14 01:26:33 oh-popmap7 dovecot: director: Error: director(10.142.0.162:1234/left): Invalid HOST-FLUSH args Jul 14 01:26:33 oh-popmap7 dovecot: director: Error: director(10.142.0.162:1234/right): Invalid HOST-FLUSH args For some reason, flushing a host address only disconnects one side: [root at cc-popmap7 ~]# doveadm director flush 10.142.0.160 Jul 14 01:28:23 cc-popmap7 dovecot: director: Error: Director 10.142.0.180:1234/right disconnected Jul 14 01:28:23 oh-popmap7 dovecot: director: Error: director(10.142.0.162:1234/left): Invalid HOST-FLUSH args -Brad
On Wed, 2010-07-14 at 01:39 -0700, Brandon Davidson wrote:> I've got a couple more issues with the doveadm director interface: > > 1) If I use "doveadm director remove" to disable a host with active users, > the director seems to lose track of users mapped to that host.Yes, that's what it was intended to do.> I guess I > would expect it to tear down any active sessions by killing the login > proxies,Hmh.. I guess that would be nice, but also a bit annoying to do. It would require each login process to have a connection to director process, and currently there's no such connection (except for the notify fifo, but that's wrong way).> like I'd done 'doveadm direct add HOSTNAME 0 && doveadm director > flush HOSTNAME' before removing it?But that does almost the same thing as remove.> 2) "doveadm director flush" returns the wrong usage:Fixed.> 3) "doveadm director flush" all breaks the ring:Fixed.
Timo, On 7/15/10 4:12 PM, "Timo Sirainen" <tss at iki.fi> wrote:> >> Maybe there could be a parameter to get the user list from a file (one >> username per line) instead of userdb. > > Added -f parameter for this.Awesome! I dumped a userlist (one username per line) which it seems to read through quite quickly, unfortunately I get... [root at cc-popmap7 ~]# doveadm director map -f userlist.txt Segmentation fault (lots of pread/mmap snipped) pread(9, "user0\nuser1\nuser2\nuser3\nuser4"..., 8189, 393042) = 8189 mmap(NULL, 2101248, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2acbc3aae000 pread(9, "user5\nuser6\nuser7\nuser8\nuser9"..., 8188, 401231) = 36 pread(9, "", 8152, 401267) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- #1 0x00002b55977ec1d0 in auth_connection_close () from /usr/lib64/dovecot/libdovecot.so.0 #2 0x00002b55977ec258 in auth_master_deinit () from /usr/lib64/dovecot/libdovecot.so.0 #3 0x000000000040a059 in user_file_get_user_list () #4 0x000000000040a22f in cmd_director_map () #5 0x000000000040897d in doveadm_try_run_multi_word () #6 0x0000000000408aab in doveadm_try_run () #7 0x0000000000408e0f in main () -Brad