From 79fa7c44d683fdbf5b3041e6aad4607560a8c4e5 Mon Sep 17 00:00:00 2001 From: Michael Fritch Date: Thu, 4 Feb 2021 18:19:25 -0700 Subject: [PATCH] cephadm: configure journald as the logdriver Introduced by e6792f306ab4d07251588fdca6ed3876ae3a092a podman containers running in a detached `-d` state need to have a configured logdriver for `cephadm logs` to be able to gather the daemon output from journald Fixes: https://tracker.ceph.com/issues/47916 Signed-off-by: Michael Fritch (cherry picked from commit 7c44f21bbbb0426fc2f83cfff7966c8bb9a71641) --- src/cephadm/cephadm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index f5129390dd9e8..c601fc24814f0 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2368,11 +2368,13 @@ def get_container(ctx: CephadmContext, # so service can have Type=Forking if 'podman' in ctx.container_path: runtime_dir = '/run' - container_args.extend(['-d', + container_args.extend([ + '-d', '--log-driver', 'journald', '--conmon-pidfile', runtime_dir + '/ceph-%s@%s.%s.service-pid' % (fsid, daemon_type, daemon_id), '--cidfile', - runtime_dir + '/ceph-%s@%s.%s.service-cid' % (fsid, daemon_type, daemon_id)]) + runtime_dir + '/ceph-%s@%s.%s.service-cid' % (fsid, daemon_type, daemon_id), + ]) return CephContainer( ctx, -- 2.39.5