]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm: configure journald as the logdriver
authorMichael Fritch <mfritch@suse.com>
Fri, 5 Feb 2021 01:19:25 +0000 (18:19 -0700)
committerSebastian Wagner <sebastian.wagner@suse.com>
Tue, 23 Feb 2021 09:58:23 +0000 (10:58 +0100)
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 <mfritch@suse.com>
(cherry picked from commit 7c44f21bbbb0426fc2f83cfff7966c8bb9a71641)

src/cephadm/cephadm

index f5129390dd9e80f28965324331aabea110602f68..c601fc24814f0d3a7e6047fb603ab9ef6176d57e 100755 (executable)
@@ -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,