| Summary: | [RFE] Change vdsm-logroate cron jobs definition | ||
|---|---|---|---|
| Product: | [oVirt] vdsm | Reporter: | Jiri Belka <jbelka> |
| Component: | General | Assignee: | Yaniv Bronhaim <ybronhei> |
| Status: | CLOSED WONTFIX | QA Contact: | Pavel Stehlik <pstehlik> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.18.15 | CC: | bugs, jbelka, nsoffer, oourfali, ybronhei |
| Target Milestone: | --- | Keywords: | FutureFeature |
| Target Release: | --- | Flags: | ybronhei:
ovirt-future?
rule-engine: planning_ack? ybronhei: devel_ack+ rule-engine: testing_ack? |
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-16 12:37:48 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: | |
|
Description
Jiri Belka
2016-10-07 11:43:33 UTC
Plus following seems to be doable directly in logrote configuration with 'postrotate':
~~~
#!/bin/sh
/usr/sbin/logrotate /etc/vdsm/logrotate/vdsm
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
if [ -d /var/log/core ] ; then
/usr/bin/find /var/log/core -type f -name '*xz' -mtime +7 -exec /bin/rm -f '{}' \;
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
/usr/bin/logger -t logrotate "ALERT clean old core files exited abnormally with [$EXITVALUE]"
fi
fi
exit $EXITVALUE
~~~
Maybe an example:
~~~
...
sharedscripts
postrotate
/usr/bin/find /var/log/core -type f -name '*xz' -mtime +7 -exec /bin/rm -f '{}' \;
endscript
...
~~~
Doesn't '-exec ...' is too expensive? Maybe pipe to xargs ?... Yaniv - your thoughts here? Will be nice to take some actions in this area. we'll get into it for later release Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone. 1 hour of log create GB of log file? I never seen this. Jiri, can you share an example log file? I don't mind switching to more sysadmin friendly configuration, but I don't see how this is helpful. (In reply to Nir Soffer from comment #6) > 1 hour of log create GB of log file? I never seen this. > Jiri, can you share an example log file? The content is not really relevant. > > I don't mind switching to more sysadmin friendly configuration, but I don't > see > how this is helpful. (In reply to Jiri Belka from comment #7) > (In reply to Nir Soffer from comment #6) > > 1 hour of log create GB of log file? I never seen this. > > Jiri, can you share an example log file? > > The content is not really relevant. It is, vdsm should not produce so much log data, maybe you are using an older version that spammed the log? Please check with latest 4.0 or 4.1, and share with us one hour of debug log. (In reply to Nir Soffer from comment #8) > (In reply to Jiri Belka from comment #7) > > (In reply to Nir Soffer from comment #6) > > > 1 hour of log create GB of log file? I never seen this. > > > Jiri, can you share an example log file? > > > > The content is not really relevant. > > It is, vdsm should not produce so much log data, maybe you are using an older > version that spammed the log? > > Please check with latest 4.0 or 4.1, and share with us one hour of debug log. feel free to close this, i'm not interested in this enhancement anymore. please re-open if required in any case. we need good reason to change the current behavior |