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

replace logrotate script, for debian upstart #349

Merged
merged 3 commits into from May 15, 2017
Merged

replace logrotate script, for debian upstart #349

merged 3 commits into from May 15, 2017

Conversation

flah00
Copy link
Contributor

@flah00 flah00 commented Feb 26, 2016

Problem

The debian rabbitmq-server package relies on /etc/init.d/rabbitmq-server to rotate logs. When installing rabbitmq-server, with upstart support, the init script is removed. This prevents the log files from properly rotating.

Solution

Add logrotate cookbook, configure logrotate when debian upstart installs.

Before

/var/log/rabbitmq/*.log {
        weekly
        missingok
        rotate 20
        compress
        delaycompress
        notifempty
        sharedscripts
        postrotate
            /etc/init.d/rabbitmq-server rotate-logs > /dev/null
        endscript
}

After

# This file was generated by Chef for rabbitmq-24.staging.us-west-2.adaptly.com.
# Do not modify this file by hand!

"/var/log/rabbitmq/*.log" {
  weekly
  rotate 20
  missingok
  notifempty
  delaycompress
  sharedscripts
  postrotate
  /usr/sbin/rabbitmqctl rotate_logs > /dev/null
  endscript
}

@jjasghar
Copy link
Contributor

Can you rebase off master please? I'd like to merge this for the next release.

@arpad9
Copy link

arpad9 commented Jan 17, 2017

@flah00 bump :-)

@flah00
Copy link
Contributor Author

flah00 commented Jan 19, 2017

@jjasghar rebased, sorry for the extraordinary delay

@bdwyertech
Copy link
Contributor

I like this 👍

@jjasghar jjasghar merged commit 4c744d1 into rabbitmq:master May 15, 2017
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