From: Adam King Date: Fri, 2 Jun 2023 00:06:35 +0000 (-0400) Subject: cephadm: add tcmu-runner to logrotate config X-Git-Tag: v18.2.1~328^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9cb4937fa27f55a5647f57fae3d26ad2f0d18a42;p=ceph.git cephadm: add tcmu-runner to logrotate config This process could be used to set up the tcmu-runner to log to a file much like other ceph daemons - create /etc/tcmu directory - create /etc/tcmu/tcmu.conf directory with default options - change dir to /var/log - change log level to 4 - add -v /etc/tcmu:/etc/tcmu to tcmu-runner container podman line in unit.run In order to support this (mostly for debugging) we should add tcmu-runner to the logrotate config Fixes: https://tracker.ceph.com/issues/61571 Signed-off-by: Adam King (cherry picked from commit d5d40e07cae8a1d6a94029c4354d146b0baa3971) --- diff --git a/src/cephadm/cephadm.py b/src/cephadm/cephadm.py index 593a08f009e9..c22449001853 100755 --- a/src/cephadm/cephadm.py +++ b/src/cephadm/cephadm.py @@ -4001,6 +4001,18 @@ def install_base_units(ctx, fsid): first child (bash), but that isn't the ceph daemon. This is simpler and should be harmless. """ + targets: List[str] = [ + 'ceph-mon', + 'ceph-mgr', + 'ceph-mds', + 'ceph-osd', + 'ceph-fuse', + 'radosgw', + 'rbd-mirror', + 'cephfs-mirror', + 'tcmu-runner' + ] + f.write("""# created by cephadm /var/log/ceph/%s/*.log { rotate 7 @@ -4008,13 +4020,13 @@ def install_base_units(ctx, fsid): compress sharedscripts postrotate - killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror cephfs-mirror || pkill -1 -x 'ceph-mon|ceph-mgr|ceph-mds|ceph-osd|ceph-fuse|radosgw|rbd-mirror|cephfs-mirror' || true + killall -q -1 %s || pkill -1 -x '%s' || true endscript missingok notifempty su root root } -""" % fsid) +""" % (fsid, ' '.join(targets), '|'.join(targets))) def get_unit_file(ctx, fsid):