Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 1848388

Summary: [GSS][RFE]: logrotate /var/log/ceph/* in Containerized deployments
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Patrick C. F. Ernzer <pcfe>
Component: Ceph-AnsibleAssignee: Guillaume Abrioux <gabrioux>
Status: CLOSED ERRATA QA Contact: Ameena Suhani S H <amsyedha>
Severity: medium Docs Contact: Aron Gunn <agunn>
Priority: high    
Version: 4.1CC: agunn, amsyedha, aschoen, assingh, ceph-eng-bugs, dparkes, gabrioux, gmeno, gsitlani, kbhaskar, lithomas, mamccoma, mhackett, mmuench, nthomas, oelswah, pdhange, rmahique, tserlin, vereddy, ykaul
Target Milestone: z2Keywords: FutureFeature
Target Release: 4.1   
Hardware: All   
OS: Linux   
Whiteboard:
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.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 17:25:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1811582, 1816167    

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