Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logrotate configuration adding global defaults affecting other system logs #4557

Closed
7 tasks done
willx0 opened this issue Apr 20, 2020 · 1 comment
Closed
7 tasks done

Comments

@willx0
Copy link

willx0 commented Apr 20, 2020

Description
Current logrotate configuration as included in the opennebula packages eg. /etc/logrotate.d/opennebula, is adding defaults to the global logrotate configuration changing the naming of other system logs.

To Reproduce
Running logrotate will add the date extension specified in the opennebula logrotate config on other system logs and cause them to be retained for 52 weeks unless explicitly configured otherwise.

Expected behavior
Logrotate options should only affect opennebula logs in /var/log/one directory.

Details

  • Affected Component: core
  • Version: 5.10.1

Current configuration:

delaycompress
dateext
dateformat -%Y%m%d-%s
compress
weekly
rotate 52
/var/log/one/one_xmlrpc.log /var/log/one/oned.log {
missingok
notifempty
copytruncate
}

Options should be moved into the log stanza:

/var/log/one/one_xmlrpc.log /var/log/one/oned.log {
    missingok
    notifempty
    copytruncate
    delaycompress
    dateext
    dateformat -%Y%m%d-%s
    compress 
    weekly
    rotate 52
}

Additional context
This problem applies to all other logrotate configs eg. opennebula-econe, opennebula-flow, etc.

A single configuration as follows would negate the need for separate configs for the other components:

/var/log/one/*.log {
    missingok
    notifempty
    copytruncate
    delaycompress
    dateext
    dateformat -%Y%m%d-%s
    compress 
    weekly
    rotate 52
}

Progress Status

  • Branch created
  • Code committed to development branch
  • Testing - QA
  • Documentation
  • Release notes - resolved issues, compatibility, known issues
  • Code committed to upstream release/hotfix branches
  • Documentation committed to upstream release/hotfix branches
@vholer
Copy link
Contributor

vholer commented Apr 23, 2020

Nice catch, thanks @willx0 !

PRs to merge into master:

rsmontero pushed a commit to OpenNebula/docs that referenced this issue Apr 23, 2020
rsmontero pushed a commit that referenced this issue Apr 23, 2020
rsmontero added a commit to OpenNebula/docs that referenced this issue Apr 23, 2020
@vholer vholer closed this as completed Apr 23, 2020
atodorov-storpool pushed a commit to storpool/one that referenced this issue Apr 24, 2020
@vholer vholer modified the milestones: Release 5.12, Release 5.10.5 May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants