Bug 1848388 - [GSS][RFE]: logrotate /var/log/ceph/* in Containerized deployments
Summary: [GSS][RFE]: logrotate /var/log/ceph/* in Containerized deployments
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Ansible
Version: 4.1
Hardware: All
OS: Linux
high
medium
Target Milestone: z2
: 4.1
Assignee: Guillaume Abrioux
QA Contact: Ameena Suhani S H
Aron Gunn
URL:
Whiteboard:
: 1853383 1853708 (view as bug list)
Depends On:
Blocks: 1811582 1816167
TreeView+ depends on / blocked
 
Reported: 2020-06-18 09:32 UTC by Patrick C. F. Ernzer
Modified: 2024-03-25 16:03 UTC (History)
21 users (show)

Fixed In Version: ceph-ansible-4.0.29-1.el8cp, ceph-ansible-4.0.29-1.el7cp
Doc Type: Enhancement
Doc Text:
.Added support for `logrotate` in containerized {storage-product} deployments With this release, containerized Ceph logs are rotated using the `logrotate` program. This can help prevent the file system from filling up with log data.
Clone Of:
Environment:
Last Closed: 2020-09-30 17:25:42 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-ansible pull 5609 0 None closed Added a feature to add logrotate configuration file. 2021-02-09 04:08:40 UTC
Red Hat Issue Tracker RHCEPH-8050 0 None None None 2023-12-15 18:14:43 UTC
Red Hat Knowledge Base (Solution) 5209251 0 None None None 2021-02-09 04:14:04 UTC
Red Hat Product Errata RHBA-2020:4144 0 None None None 2020-09-30 17:26:08 UTC

Description Patrick C. F. Ernzer 2020-06-18 09:32:53 UTC
Description of problem:
logs in /var/log/ceph/ do not seem to be rotated.
This is problematic, especially when there are issues during bring up, I have a host on customer-site where /var/log/ceph/ceph-volume.log is 17GiB after just 4 days.

Version-Release number of selected component (if applicable):
ceph-ansible-4.0.23-1.el8cp.noarch

How reproducible:
always

Steps to Reproduce:
1. set up a ceph cluster with ceph-ansible
2. wait one day
3. check /var/log/ceph/ on all ceph nodes
4. wait one week
5. check /var/log/ceph/ again

Actual results:
logs not rotated after a day, logs not rotated after a week

Expected results:
logs rotated and compressed, ideally every night but at the very least every week

Additional info:
I'm unsure if I can just rotate the logs while ceph-volume is running or if I need to send it a signal or if I should just user copytruncate (ceph-volume could continue writing to the file in that case).
If you can answer that, then I can write a /etc/logrotate.d/ceph, attach here and test in my homelab.

Comment 1 Guillaume Abrioux 2020-07-02 14:34:16 UTC
*** Bug 1853383 has been marked as a duplicate of this bug. ***

Comment 2 Osama Elswah 2020-07-06 08:31:34 UTC
*** Bug 1853708 has been marked as a duplicate of this bug. ***

Comment 25 Osama Elswah 2020-09-10 14:15:15 UTC
Hi @Ameena, 
When the logs belong root:root then no logs are written. I have to change them to ceph:ceph or 167:167 and restart the services. Then Ceph starts writing the logs.

Comment 29 errata-xmlrpc 2020-09-30 17:25:42 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 (Red Hat Ceph Storage 4.1 Bug Fix update), 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://access.redhat.com/errata/RHBA-2020:4144


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