From: Sage Weil Date: Tue, 14 Jan 2020 23:11:48 +0000 (-0600) Subject: cephadm: fix logging defaults X-Git-Tag: v15.1.0~185^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=d07359192ef429a4f9ff9c09cc4360220da71bc4;p=ceph.git cephadm: fix logging defaults - 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 --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 985e70a38631c..90f15903cbf6b 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -748,12 +748,17 @@ def get_daemon_args(fsid, daemon_type, daemon_id): if daemon_type in Ceph.daemons: r += [ + '--setuser', 'ceph', + '--setgroup', 'ceph', '--default-log-to-file=false', '--default-log-to-stderr=true', - '--setuser', 'ceph', - '--setgroup', 'ceph' + '--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