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

Conversation

Projects
None yet
4 participants
@flah00
Copy link
Contributor

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

This comment has been minimized.

Copy link
Collaborator

commented Jul 28, 2016

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

@arpad9

This comment has been minimized.

Copy link

commented Jan 17, 2017

@flah00 bump :-)

@flah00 flah00 force-pushed the Adaptly:pc-fix-debian-upstart-logrotate branch from fe7f05c to ad6e5ac Jan 19, 2017

@flah00

This comment has been minimized.

Copy link
Contributor Author

commented Jan 19, 2017

@jjasghar rebased, sorry for the extraordinary delay

@bdwyertech

This comment has been minimized.

Copy link
Contributor

commented May 15, 2017

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
You can’t perform that action at this time.