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

CoreOS logrotate #2710

Closed
adrianchifor opened this issue Jun 12, 2017 · 6 comments
Closed

CoreOS logrotate #2710

adrianchifor opened this issue Jun 12, 2017 · 6 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@adrianchifor
Copy link

Was just wondering why logrotate configs are not installed on CoreOS? Source:

glog.Infof("Detected CoreOS; won't install logrotate")

@ghost
Copy link

ghost commented Jun 12, 2017

I read the Git blame and the code, all container-centric distros don't get logrotate installed. I would assume the intention is to keep deployments on these distros as light as possible in concordance with the distros' design ethos.

@justinsb, you implemented logrotate for kops, could you confirm my suspicion?

@adrianchifor
Copy link
Author

@WillemMali Thanks for the response, altought I just checked one of our base CoreOS v1353 nodes and there is a logrotate systemd service installed. kops 1.5.3 had logrotate configs at /etc/logrotate.d but since kops 1.6.0 we had to add them ourselves.

@chrislovecnm
Copy link
Contributor

@adrianchifor what should we be doing? Was it getting installed in the past? Was it in the base image in the past? You are the user and know more than I do about CoreOS thank I do :)

@adrianchifor
Copy link
Author

@chrislovecnm As far as I can remember, CoreOS has always had logrotate as a systemd service. We had kops 1.5.3 on our k8s clusters recently and the /etc/logrotate.d folder contained the k8s-related logrotate configs. When we upgraded to kops 1.6.0 the logrotate configs were gone.

Instead of checking the OS distribution if we need to apply the logrotate configs, we should check if logrotate is installed (check systemd or check if the binary exists at /usr/sbin/logrotate, default location on CoreOS).

k8s-github-robot pushed a commit that referenced this issue Oct 9, 2017
Automatic merge from submit-queue.

Enable logrotate for Kubernetes configs on CoreOS

Addresses #2710.

Also, remove logrotate crontab because logrotate ships with a systemd timer, `logrotate.timer`, to run logrotate daily.
k8s-github-robot pushed a commit that referenced this issue Oct 10, 2017
Automatic merge from submit-queue.

Replace logrotate crontab with systemd timer

Related to #2710, minor improvement mentioned in #3488 (comment).

This change replaces the logrotate crontab with a systemd timer. Any existing systemd timer for logrotate will be overridden.
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or @fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 27, 2017
@adrianchifor
Copy link
Author

/close

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

4 participants