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

Minor logrotate configuration fixes #895

Merged
merged 2 commits into from
Aug 3, 2016
Merged

Conversation

mhorbul
Copy link
Contributor

@mhorbul mhorbul commented Aug 2, 2016

The following fixes in the logrotate configuration files allows to avoid issues on the boxes with SELinux enabled.

@marcparadise
Copy link
Member

marcparadise commented Aug 2, 2016

Thanks for submitting this @mhorbul! The changes look good. I'll run this through our CI and merge if there are no issues.

@@ -3,4 +3,4 @@
PATH=/opt/opscode/embedded/sbin:$PATH

command -v logrotate >/dev/null 2>&1 || exit 0
nice -n 19 ionice -c3 logrotate /etc/opscode/logrotate.conf
nice -n 19 ionice -c3 logrotate -s /var/log/chef/logrotate.status /etc/opscode/logrotate.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks good, my only question is whether /var/log/chef is the most appropriate path for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point. Let me move it to /var/log/opscode.

mhorbul added 2 commits August 2, 2016 15:37
when SELinux is enabled on the box opscode logrotate updates fcontext of
the status file every time it runs and that breaks default system
logrotate process.
otherwise signal is sent to the nginx with the default configuration
file which causes error.log being created in the wrong location.
Also if SELinux is turned on the box, logrotate breaks due to the fact
that the logrotate_exec_t service can not modify files labeled usr_t.
Default error.log locates in the
/opt/opscode/embedded/nginx/logs/error.log and labeled as usr_t.
@marcparadise
Copy link
Member

This went through with no issue, and I've restarted the Travis job (looks a transient failure where the tests were terminated externally). Will merge once that's clear.

@marcparadise marcparadise merged commit 3607d81 into chef:master Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants