Bug 1884469

Summary: Log files are created after installation with rights root:root
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Osama Elswah <oelswah>
Component: RADOSAssignee: Brad Hubbard <bhubbard>
Status: CLOSED ERRATA QA Contact: Pawan <pdhiran>
Severity: low Docs Contact:
Priority: unspecified    
Version: 4.1CC: akupczyk, aschoen, bhubbard, ceph-eng-bugs, dzafman, gmeno, gsitlani, jansingh, kchai, knortema, lithomas, nojha, nthomas, pdhiran, rzarzyns, sseshasa, tpetr, tserlin, vereddy, ykaul
Target Milestone: ---   
Target Release: 4.2z1   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-14.2.11-110.el8cp, ceph-14.2.11-110.el7cp Doc Type: Bug Fix
Doc Text:
.Log files were created with incorrect permissions Previously, a code addition changed the order in which relevant functions were called. This caused some daemons to create log files with incorrect permissions. With this release, functions are called in the correct order, and the daemons create log files with the correct permissions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-28 20:12:32 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: 1890121    

Description Osama Elswah 2020-10-02 05:45:02 UTC
Description of problem:
Log files are created with rights root:root after cluster installation, therefore Ceph can't write the logs in the files.
 
For example: 
[vagrant@osd01 ~]$ ll -a /var/log/ceph/
total 920
drwxr-xr-x.  2  167  167    223 Oct  1 21:48 .
drwxr-xr-x. 11 root root   4096 Oct  1 21:45 ..
-rw-r--r--.  1 root root      0 Oct  1 21:45 ceph-client.admin.log
-rw-r--r--.  1 root root      0 Oct  1 21:46 ceph-mgr.osd01.log
-rw-r--r--.  1  167  167 426058 Oct  2 05:24 ceph-mon.osd01.log
-rw-r--r--.  1 root root      0 Oct  1 21:47 ceph-osd.0.log
-rw-r--r--.  1 root root      0 Oct  1 21:48 ceph-osd.12.log
-rw-r--r--.  1 root root      0 Oct  1 21:48 ceph-osd.17.log
-rw-r--r--.  1 root root      0 Oct  1 21:48 ceph-osd.22.log
-rw-r--r--.  1 root root      0 Oct  1 21:47 ceph-osd.6.log
-rw-r--r--.  1 root root 411567 Oct  1 21:49 ceph-volume.log

From the above files only the mon log file is created correctly (rights for file are 167:167), and all other files remain empty as the daemons can't write in root owned files 

Version-Release number of selected component (if applicable):
Ceph-ansible is ceph-ansible-4.0.31-1.el8cp.noarch
RHCS is 4.1z2


How reproducible:
Everytime

Steps to Reproduce:
1. Create a cluster with the configuration parameter "log_to_file= true"
2. Check /var/log/ceph

Actual results:
Log files remain empty

Expected results:
Logs should be written in log files

Comment 26 errata-xmlrpc 2021-04-28 20:12:32 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 (Important: Red Hat Ceph Storage security, bug fix, and enhancement 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/RHSA-2021:1452