Skip to content

Commit

Permalink
cephadm: fix logging defaults
Browse files Browse the repository at this point in the history
- prefix stderr log lines with 'debug '
- send cluster log to stderr (only affects mons)
- default to sending cluser log to stderr only (not to file)

This aligns things with the container-y way, as we do
with rook.  It means that if you want legacy behavior (log files),
you have *2* settings to change:

 log_to_file = true
 mon_cluster_log_to_file = true

We could default this to leave cluster log to file by default
since they aren't that big (and we do have log rotation), but
it's not as clean as it could be...

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Jan 15, 2020
1 parent b5d145f commit 2adb2a1
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/cephadm/cephadm
Expand Up @@ -748,12 +748,17 @@ def get_daemon_args(fsid, daemon_type, daemon_id):

if daemon_type in Ceph.daemons:
r += [
'--default-log-to-file=false',
'--default-log-to-stderr=true',
'--setuser', 'ceph',
'--setgroup', 'ceph'
'--default-log-to-file=false',
'--default-log-to-stderr=true',
'--default-log-stderr-prefix=debug\ ',
]

if daemon_type == 'mon':
r += [
'--default-mon-cluster-log-to-file=false',
'--default-mon-cluster-log-to-stderr=true',
]
elif daemon_type in Monitoring.components:
component = Monitoring.components[daemon_type] # type: ignore
metadata = component.get('image', list()) # type: ignore
Expand Down

0 comments on commit 2adb2a1

Please sign in to comment.