Bug 1113264
| Summary: | Incorrect usage of logrotate leads to using two different settings | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Alon Bar-Lev <alonbl> | |
| Component: | vdsm | Assignee: | Yaniv Bronhaim <ybronhei> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Jiri Belka <jbelka> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 3.4.0 | CC: | bazulay, danken, gklein, iheim, lpeer, mkalinin, oourfali, pstehlik, sherold, yeylon | |
| Target Milestone: | --- | Keywords: | ZStream | |
| Target Release: | 3.5.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | infra | |||
| Fixed In Version: | vt2.2 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1126482 (view as bug list) | Environment: | ||
| Last Closed: | 2015-02-16 13:38:40 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | Infra | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1126482, 1142923, 1156165 | |||
|
Description
Alon Bar-Lev
2014-06-25 19:28:48 UTC
Could you explain why option 2, with its wider system-wide effects, is more recommended? All we want to do is stop the effect of logrotate.conf on vdsm, and moving /etc/logrotate.d/vdsm away does just that. An even simpler fix would be to add an explicit 'nodateext' to /etc/logrotate.d/vdsm, which would force "normal" extension to vdsm.log even when executed via /etc/logrotate.conf. This would keep the ugly race between the hourly and the daily runs, but would make them unnoticeable again. oh, and if "minsize" is to replace "size" in the conf, please test it thoroughly. I recall that it had non-intuitive semantics. (In reply to Dan Kenigsberg from comment #1) > Could you explain why option 2, with its wider system-wide effects, is more > recommended? All we want to do is stop the effect of logrotate.conf on vdsm, > and moving /etc/logrotate.d/vdsm away does just that. you should not override sysadmin preferences. it is up to component to provide logrotate configuration. it is up to sysadmin to decide where/when/how it will be used. any change in /etc/logrotate.conf is expected to effect the entire logrotation of the system. > An even simpler fix would be to add an explicit 'nodateext' to > /etc/logrotate.d/vdsm, which would force "normal" extension to vdsm.log even > when executed via /etc/logrotate.conf. This would keep the ugly race between > the hourly and the daily runs, but would make them unnoticeable again. see above. if you use logrotate and also install it so that the system logrotation picks it up, you do not override the system setting just for fun. either create your custom rotation move it out from the system logrotation configuration, you can use logrotate or any other custom program you may like. this is bad practice as sysadmin that is not aware of your inventions is incapable of managing his system using best practices. or use the logrotate as expected. (In reply to Alon Bar-Lev from comment #3) > > you should not override sysadmin preferences. I thought that your option 2 was about doing just that (making the system logrotate run every hour). imo your option 1 is precise and favorable. (In reply to Dan Kenigsberg from comment #4) > (In reply to Alon Bar-Lev from comment #3) > > > > you should not override sysadmin preferences. > > I thought that your option 2 was about doing just that (making the system > logrotate run every hour). imo your option 1 is precise and favorable. making logrotate run every hour should not have negative effect if run without force, logrotate is designed to be run also at different intervals. in ovirt-engine we did not modify the logrotate scheduling, but suggest to add it to hourly or higher if the system is loaded. Please backport to the ovirt-3.5 branch - it is a 3.5.0 bug. ok, vdsm-4.16.3-2.el6.x86_64 changed to 50k to see if it works. [root@dell-r210ii-04 yum.repos.d]# ls -l /etc/vdsm/logrotate/vdsm /etc/cron.hourly/vdsm-logrotate -rwxr-xr-x. 1 root root 484 Sep 5 14:23 /etc/cron.hourly/vdsm-logrotate -rw-r--r--. 1 root root 315 Sep 5 14:34 /etc/vdsm/logrotate/vdsm [root@dell-r210ii-04 yum.repos.d]# ls -l /var/log/vdsm/ total 100 drwxr-xr-x. 2 vdsm kvm 4096 Sep 2 18:04 backup -rw-r--r--. 1 vdsm kvm 475 Sep 5 13:44 connectivity.log -rw-r--r--. 1 vdsm kvm 1037 Sep 5 13:45 mom.log -rw-r--r--. 1 root root 24514 Sep 5 13:49 supervdsm.log -rw-r--r--. 1 root root 4731 Sep 5 13:44 upgrade.log -rw-r--r--. 1 vdsm kvm 48458 Sep 5 14:35 vdsm.log -rw-r--r--. 1 vdsm kvm 7556 Sep 5 14:34 vdsm.log.1.xz |