Merge pull request #51881 from adk3798/logrotate-tcmu-runner

cephadm: add tcmu-runner to logrotate config

Reviewed-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
Adam King 2023-08-16 13:05:08 -04:00 committed by GitHub
commit 149e07d633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4367,6 +4367,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
@ -4374,13 +4386,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):