Project

General

Profile

Bug #7849

ceph-conf create empty log files

Added by Dmitry Smirnov about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
-
% Done:

0%

Source:
Community (user)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

`ceph-conf` creates empty log files in "/var/log/ceph". This is unexpected, undesireable (and undocumented) behaviour.
Even worse, it makes log files for non-existent config sections.

For example the following command:

/usr/bin/ceph-conf -c /etc/ceph/ceph.conf --name osd.999 --lookup "host" 

creates the following file:
/var/log/ceph/ceph-osd.999.log

This is not what config file query tool should do.

Associated revisions

Revision acc31e75 (diff)
Added by Sage Weil about 7 years ago

ceph-conf: do not log

If you are querying the conf for an osd and it has a log configured, we
should not generate any log activity.

This isn't super pretty, but it is much less intrusive that wiring a 'do
not log' flag down into CephContext and a zillion other places.

Fixes: #7849
Signed-off-by: Sage Weil <>

Revision fc1a424e (diff)
Added by Sage Weil about 7 years ago

ceph-conf: use global_pre_init to avoid starting logging

This avoids starting up logging, which is not appropriate when we are
examining the config state and not actually starting up the entity in
question.

Fixes: #7849
Signed-off-by: Sage Weil <>

History

#1 Updated by Sage Weil about 7 years ago

  • Status changed from New to 12
  • Priority changed from Normal to Urgent

This should be just a matter of passing the right flags to common_init or global_init

#2 Updated by Sage Weil about 7 years ago

  • Status changed from 12 to Fix Under Review
  • Source changed from other to Community (user)

#3 Updated by Josh Durgin about 7 years ago

  • Status changed from Fix Under Review to Resolved

#4 Updated by Sage Weil about 7 years ago

  • Status changed from Resolved to In Progress

oops, the previous fix breaks ceph.py, which does ceph-conf --show-config-value to get admin_socket.

#5 Updated by Sage Weil about 7 years ago

  • Target version deleted (0.79)

#6 Updated by Dmitry Smirnov about 7 years ago

Socket part was introduced later -- perhaps only socket part shall be reversed?
Log-related change seems safe...

#7 Updated by Sage Weil about 7 years ago

  • Status changed from In Progress to Fix Under Review

#8 Updated by Ian Colle about 7 years ago

  • Assignee set to Josh Durgin

Josh - please review the wip branch

#9 Updated by Josh Durgin about 7 years ago

  • Status changed from Fix Under Review to Resolved
  • Assignee changed from Josh Durgin to Sage Weil

Also available in: Atom PDF