Bug 1884469 - Log files are created after installation with rights root:root
Summary: Log files are created after installation with rights root:root
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: RADOS
Version: 4.1
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
: 4.2z1
Assignee: Brad Hubbard
QA Contact: Pawan
URL:
Whiteboard:
Depends On:
Blocks: 1890121
TreeView+ depends on / blocked
 
Reported: 2020-10-02 05:45 UTC by Osama Elswah
Modified: 2024-03-25 16:38 UTC (History)
20 users (show)

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.
Clone Of:
Environment:
Last Closed: 2021-04-28 20:12:32 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Ceph Project Bug Tracker 48583 0 None None None 2020-12-14 02:35:15 UTC
Github ceph ceph pull 38558 0 None closed nautilus: common: fix logfile create perms 2021-02-15 23:03:04 UTC
Red Hat Issue Tracker RHCEPH-6153 0 None None None 2023-02-16 14:52:57 UTC
Red Hat Knowledge Base (Solution) 5700071 0 None None None 2023-02-16 14:52:00 UTC
Red Hat Product Errata RHSA-2021:1452 0 None None None 2021-04-28 20:13:04 UTC

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


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