[CentOS] [OT] fail2ban update (epel) breaks logrotate

Sun Oct 18 14:21:54 UTC 2015
Tony Mountifield <tony at softins.co.uk>

Apologies, this is slightly off-topic being to do with an EPEL package,
although it's running on CentOS6, so I thought others here might have come
across this issue.

I have five CentOS 6 systems running fail2ban from EPEL, and this
package was updated in the last week from 0.9.2-1.el6 to 0.9.3-1.el6.

On all these systems, I received an error from logrotate this morning.

It appears that something has broken the flushlogs option in fail2ban-client:

[root at system ~]# cat /etc/logrotate.d/fail2ban
#
# Gentoo:
# http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-analyzer/fail2ban/files/fail2ban-logrotate?view=markup
#
# Debian:
# https://github.com/fail2ban/fail2ban/blob/debian/debian/fail2ban.logrotate
#
# Fedora view:
#  http://pkgs.fedoraproject.org/cgit/fail2ban.git/tree/fail2ban-logrotate

/var/log/fail2ban.log {
    rotate 7
    missingok
    compress
    postrotate
      /usr/bin/fail2ban-client flushlogs  1>/dev/null || true
    endscript
}
[root at system ~]# /usr/bin/fail2ban-client flushlogs
logs: rolled over
Traceback (most recent call last):
  File "/usr/bin/fail2ban-client", line 470, in <module>
    if client.start(sys.argv):
  File "/usr/bin/fail2ban-client", line 440, in start
    return self.__processCommand(args)
  File "/usr/bin/fail2ban-client", line 281, in __processCommand
    return self.__processCmd([cmd])
  File "/usr/bin/fail2ban-client", line 185, in __processCmd
    client.close()
  File "/usr/lib/python2.6/site-packages/fail2ban/client/csocket.py", line 55, in close
    self.__csock.sendall(CSPROTO.CLOSE + CSPROTO.END)
  File "<string>", line 1, in sendall
socket.error: [Errno 32] Broken pipe
[root at system ~]#

Has anyone else found this today? And even better know how to fix it?

There doesn't seem to be any current activity in epel-users, and I found
the update announcement in epel-package-announce, but didn't see anything
about this in the "IMPORTANT incompatible changes" section.

Cheers
Tony

-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org