[BUG] doveadm kick doesn't play well with hibernate
Hello,
Dovecot 2.2.27 (Debian Jessie backports).
When issuing a "doveadm kick" for a specific user I was greeted by:
"warning: other connections would also be kicked from following users:"
and a list of 22odd thousand users.
As it turns out, kick wants to smack the hibernation proces(ses) that have hibernated sessions for this user, obviously the wrong approach here.
If there's doveadm command to wake up and thus un-hibernate sessions for a specific user this could be used as a workaround but a quick glance suggest no such thing.
This functionality is absolutely crucial for us as we need this for our custom mailbox migration functionality.
If there's no workaround or fix within 2 months I'll be forced to disable hibernation again (with a heavy heart).
Regards,
Christian
Christian Balzer Network/Systems Engineer
chibi@gol.com Global OnLine Japan/Rakuten Communications
http://www.gol.com/
On 12 May 2017, at 5.14, Christian Balzer <chibi@gol.com> wrote:
Hello,
Dovecot 2.2.27 (Debian Jessie backports).
When issuing a "doveadm kick" for a specific user I was greeted by:
"warning: other connections would also be kicked from following users:"
and a list of 22odd thousand users.
As it turns out, kick wants to smack the hibernation proces(ses) that have hibernated sessions for this user, obviously the wrong approach here.
Kicking in backends works by sending a signal to the mail processes. It would be nice to support other ways also, but that would require larger changes.
If there's doveadm command to wake up and thus un-hibernate sessions for a specific user this could be used as a workaround but a quick glance suggest no such thing.
If you change the dovecot.index.log of any of the folders where the user is IDLEing, that'd do it. I think just find /user 'dovecot.index.log' | xargs touch would work.
This functionality is absolutely crucial for us as we need this for our custom mailbox migration functionality.
If there's no workaround or fix within 2 months I'll be forced to disable hibernation again (with a heavy heart).
How about doveadm director kick / doveadm proxy kick?
On Sun, 14 May 2017 23:34:39 +0300 Timo Sirainen wrote:
On 12 May 2017, at 5.14, Christian Balzer <chibi@gol.com> wrote:
Hello,
Dovecot 2.2.27 (Debian Jessie backports).
When issuing a "doveadm kick" for a specific user I was greeted by:
"warning: other connections would also be kicked from following users:"
and a list of 22odd thousand users.
As it turns out, kick wants to smack the hibernation proces(ses) that have hibernated sessions for this user, obviously the wrong approach here.
Kicking in backends works by sending a signal to the mail processes. It would be nice to support other ways also, but that would require larger changes.
It's probably something you'll need to address sooner or later, given that I'm pretty sure that kick isn't the only thing assuming (wrongly) that there's just one user per mail process.
If there's doveadm command to wake up and thus un-hibernate sessions for a specific user this could be used as a workaround but a quick glance suggest no such thing.
If you change the dovecot.index.log of any of the folders where the user is IDLEing, that'd do it. I think just find /user 'dovecot.index.log' | xargs touch would work.
That doesn't work for me at all.
Before and after touching the dovecot.index.log files:
# ps aux |grep chibi mail 884727 0.0 0.0 24360 9176 ? S May14 0:00 dovecot/imap [chibi@notgol.com xxx.xxx.7.126 IDLE]
# doveadm who |grep chibi
username # proto (pids) (ips)
chibi@notgol.com 8 imap (884727 877825 119157) (xxx.xxx.7.126 xxx.xxx.0.144 xxx.xxx.244.134)
# ps aux |grep hibernate dovecot 119157 0.3 0.0 63448 56372 ? S Apr01 247:20 dovecot/imap-hibernate [16361 connections] dovecot 877825 0.3 0.0 61776 54628 ? S Apr23 115:39 dovecot/imap-hibernate [10098 connections]
Note that I have "maildir_very_dirty_syncs = yes" set, but that shouldn't cause this based on the comment in the config blob.
This functionality is absolutely crucial for us as we need this for our custom mailbox migration functionality.
If there's no workaround or fix within 2 months I'll be forced to disable hibernation again (with a heavy heart).
How about doveadm director kick / doveadm proxy kick?
Just proxy here. While that would work, it would require of course new code connecting to the proxies (maintain a list as well) in sequence. Something that doesn't scale too well, since we aim to keep the mailboxes in a locked state for as short as possible.
OTOH if the "waking up" part above can't be made to work, I guess this is at least a way forward for the time being.
Christian
Christian Balzer Network/Systems Engineer
chibi@gol.com Global OnLine Japan/Rakuten Communications
http://www.gol.com/
participants (2)
-
Christian Balzer
-
Timo Sirainen