[Bugs] [Bug 1460157] New: Gluster client logs not reopened upon rotation on Ubuntu
bugzilla at redhat.com
bugzilla at redhat.com
Fri Jun 9 09:28:27 UTC 2017
https://bugzilla.redhat.com/show_bug.cgi?id=1460157
Bug ID: 1460157
Summary: Gluster client logs not reopened upon rotation on
Ubuntu
Product: GlusterFS
Version: 3.8
Component: packaging
Assignee: bugs at gluster.org
Reporter: public at hansmi.ch
CC: bugs at gluster.org
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
--
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
More information about the Bugs
mailing list