Bug 1460157
| Summary: | Gluster client logs not reopened upon rotation on Ubuntu | ||
|---|---|---|---|
| Product: | [Community] GlusterFS | Reporter: | hansmi <public> |
| Component: | packaging | Assignee: | Kaleb KEITHLEY <kkeithle> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 3.8 | CC: | bugs |
| Target Milestone: | --- | Keywords: | Triaged |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-06-13 15:01:49 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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. |
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