Bug 917560
Summary: | Rotated log file is still used for logging | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Simone Caronni <negativo17> |
Component: | ndjbdns | Assignee: | pjp <pj.pandit> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 19 | CC: | negativo17 |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://github.com/pjps/ndjbdns/ | ||
Whiteboard: | |||
Fixed In Version: | ndjbdns-1.05.8-1.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-09-11 01:58:27 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: |
Description
Simone Caronni
2013-03-04 11:00:25 UTC
I looked into this issue. It seems more complex than I thought. When logrotate(8) rotates a file, it renames it, leaving the open file descriptors unaffected. This causes servers to continue logging to a rotated file. A straight forward solution would be to just hint the server that the log file has been renamed, please create new one and continue logging there. It becomes complex because DJBDNS servers run inside a chroot(1) jail located at the $ROOT directory. Here, servers acquire privileges of the `daemon' user. Once inside the chroot(1) jail as daemon, servers can not create log file under `/var/log/' directory. One because it has no privileges and second because `/var/log' does not exist inside chroot(1) jail. This brings us to a slightly tacky solution: - Is it possible to restart a server after logrotate(8) ? - If so, what is the extent of the damage incurred ?? This is fixed now. No need to restart DNS servers. The logrotate(8) directive `copytruncate' fits the bill. -> https://github.com/pjps/ndjbdns/commit/be5fd0c90376b5c89e5b5dc3d57f64d905afe519 `copytruncate' directive copies content of the original log file to a new one, and leaves the old file as is. Patch needs review and testing though. Sorry for being late, I've been pretty busy. Put the patch into place now, the log does not need rotation yet, I'll update info here in the next days. Many thanks! --Simone Confirmed, it works properly! Is it ok for you to issue ndjbdns-1.05.7-2 with the patch or you want to wait for ndjbdns-1.05.8? Thanks, --Simone (In reply to comment #4) > Is it ok for you to issue ndjbdns-1.05.7-2 with the patch or you want to > wait for ndjbdns-1.05.8? I think let's wait for 1.05.8? I hope it'll be soon. Thanks so much for confirming! :) This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19 ndjbdns-1.05.8-1.fc18 has been submitted as an update for Fedora 18. https://admin.fedoraproject.org/updates/ndjbdns-1.05.8-1.fc18 ndjbdns-1.05.8-1.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/ndjbdns-1.05.8-1.fc19 ndjbdns-1.05.8-1.el6 has been submitted as an update for Fedora EPEL 6. https://admin.fedoraproject.org/updates/ndjbdns-1.05.8-1.el6 ndjbdns-1.05.8-1.el5 has been submitted as an update for Fedora EPEL 5. https://admin.fedoraproject.org/updates/ndjbdns-1.05.8-1.el5 ndjbdns-1.05.8-1.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. ndjbdns-1.05.8-1.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report. ndjbdns-1.05.8-1.el5 has been pushed to the Fedora EPEL 5 stable repository. If problems still persist, please make note of it in this bug report. ndjbdns-1.05.8-1.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report. |