Description of problem: The logrotate configuration included with the GlusterFS client packages for Ubuntu doesn't send SIGHUP to the clients as part of its postrotate script: /var/log/glusterfs/*.log { … rotate 7 … postrotate [ ! -f /var/run/glusterd.pid ] || kill -HUP `cat /var/run/glusterd.pid` endscript } Cient logs are written to /var/log/glusterfs/….log. Upon rotation the files are renamed, for example to /var/log/glusterfs/srv-shared-foobar_test-var.log.1. In our case that file was still opened by the client: $ ls -lh /proc/29872/fd/5 l-wx------ 1 … /proc/29872/fd/5 -> /var/log/glusterfs/srv-shared-foobar_test-var.log.1 After 7 rotations log messages end up being written to a file unreachable via the normal file system (could still be read via /proc/…/fd/…). The logrotate configuration on CentOS/RHEL looks as follows: /var/log/glusterfs/*.log { … postrotate /usr/bin/killall -HUP glusterfs > /dev/null 2>&1 || true /usr/bin/killall -HUP glusterd > /dev/null 2>&1 || true endscript } Expected behaviour: Postrotate script sends SIGHUP to Gluster client and client reopens log file. Reproduced using these package versions: glusterfs-client 3.8.12-ubuntu1~xenial1 glusterfs-client 3.10.3-ubuntu1~xenial1
All current[1] Debian and Ubuntu packages have been rebuilt using the glusterfs logrotate files. All Debian and Ubuntu packages going forward will use the glusterfs logrotate files. Debian packages are on download.gluster.org. Ubuntu packages in the Launchpad PPA. See, e.g., https://download.gluster.org/pub/gluster/glusterfs/LATEST/... README files for more info. [1] 3.8.12, 3.10.3, 3.11.0.