Actions
Feature #16885
openceph should warn the administrator when it fails to open log_file for writing
Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:
0%
Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
I'm using Ceph v10.2.2. If I have an old root-owned log file in /var/log/ceph, like so:
# chown root:root /var/log/ceph/ceph-osd.1.log
And then I try to start the OSD:
# systemctl start ceph-osd@1
The OSD process will start, but it will not indicate that it failed to open the log file.
You can verify that it has not opened the file by checking the file descriptors for the process:
# ls -l /proc/$(pgrep ceph-osd)/fd | grep log
And systemctl does not show anything wrong:
# systemctl status ceph-osd@1 -l
I don't have log_file explicitly set in my cofig, but I can see the default setting is to use a file:
$ ceph daemon osd.1 config show | grep log_file "log_file": "\/var\/log\/ceph\/ceph-osd.1.log",
And chowning the file to ceph:ceph allows the ceph-osd process to open ceph-osd.1.log for writing as usual.
It would be good to indicate a failure to open this log file to the user somehow. An extreme way to handle this would be to fail to start the daemon entirely.
No data to display
Actions