Bug 1253332 - rabbitmq logrotate conf is wrong and doesn't close the rotated files
Summary: rabbitmq logrotate conf is wrong and doesn't close the rotated files
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: rabbitmq-server
Version: 6.0 (Juno)
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: async
: 6.0 (Juno)
Assignee: Peter Lemenkov
QA Contact: Ofer Blaut
URL:
Whiteboard:
: 1197654 (view as bug list)
Depends On: 1252842 1267718
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-13 13:46 UTC by John Eckersberg
Modified: 2023-02-22 23:02 UTC (History)
13 users (show)

Fixed In Version: rabbitmq-server-3.3.5-5.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, 'systemd' did not provide an emulation for a custom non-standard SysV commands, for example, rotate-logs. Due to this, 'logratate' could not call /sbin/service for a custom SysV command anymore while rotating logs. With this update, 'logrotate' directly calls 'rabbitmqctl', resulting in the logs rotating properly.
Clone Of: 1252842
Environment:
Last Closed: 2015-11-19 23:31:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-7742 0 None None None 2022-08-10 09:56:49 UTC
Red Hat Knowledge Base (Solution) 1757383 0 None None None 2016-07-28 08:53:01 UTC
Red Hat Product Errata RHBA-2015:2495 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform 6 Bug Fix and Enhancement Advisory 2015-11-20 03:35:34 UTC

Description John Eckersberg 2015-08-13 13:46:14 UTC
+++ This bug was initially created as a clone of Bug #1252842 +++

Description of problem:

The current logrotate configuration is wrong and doesn't close the files once they are renamed:

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


# /sbin/service rabbitmq-server rotate-logs

The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

# fuser  /var/log/rabbitmq/* 

/var/log/rabbitmq/rabbit.1:  1214


Workarounded by 

# /usr/sbin/rabbitmqctl rotate_logs > /dev/null


Version-Release number of selected component (if applicable):
rabbitmq-server-3.3.5-3.el7ost.noarch 

How reproducible:
always

Steps to Reproduce:
1. wait until logs are rotated
2.
3.

Actual results:

Wrong file is use
 /var/log/rabbitmq/rabbit.1:  1214

Expected results:
Correct file in use

/var/log/rabbitmq/rabbit:  1214

Additional info:

Comment 4 Peter Lemenkov 2015-10-23 15:41:27 UTC
*** Bug 1197654 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2015-11-19 23:31:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2495.html


Note You need to log in before you can comment on or make changes to this bug.