From 2746a9b7c9d4155103bb3bdf69e9a68056edf819 Mon Sep 17 00:00:00 2001 From: Timothy Q Nguyen Date: Wed, 13 May 2026 16:19:57 -0700 Subject: [PATCH] src/cephadm: added ceph-exporter to post-rotate signal list As the title says this change simply adds ceph-exporter to a logrotate list which will ensure ceph-exporter will continue writing to a new log file even after log rotation. Currently no new log file will be written to and you will have to manually add ceph-exporter to logrotate.d. Signed-off-by: Timothy Q Nguyen --- src/cephadm/cephadmlib/logging.py | 1 + src/cephadm/tests/test_logrotate_config.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cephadm/cephadmlib/logging.py b/src/cephadm/cephadmlib/logging.py index f5893d3a51d..f722a33e78d 100644 --- a/src/cephadm/cephadmlib/logging.py +++ b/src/cephadm/cephadmlib/logging.py @@ -255,6 +255,7 @@ def write_cluster_logrotate_config(ctx: CephadmContext, fsid: str) -> None: should be harmless. """ targets: List[str] = [ + 'ceph-exporter', 'ceph-mon', 'ceph-mgr', 'ceph-mds', diff --git a/src/cephadm/tests/test_logrotate_config.py b/src/cephadm/tests/test_logrotate_config.py index c97f21019d8..2f69046cab1 100644 --- a/src/cephadm/tests/test_logrotate_config.py +++ b/src/cephadm/tests/test_logrotate_config.py @@ -23,7 +23,7 @@ def test_cluster_logrotate_config(cephadm_fs): compress sharedscripts postrotate - killall -q -1 ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror cephfs-mirror tcmu-runner || pkill -1 -x 'ceph-mon|ceph-mgr|ceph-mds|ceph-osd|ceph-fuse|radosgw|rbd-mirror|cephfs-mirror|tcmu-runner' || true + killall -q -1 ceph-exporter ceph-mon ceph-mgr ceph-mds ceph-osd ceph-fuse radosgw rbd-mirror cephfs-mirror tcmu-runner || pkill -1 -x 'ceph-exporter|ceph-mon|ceph-mgr|ceph-mds|ceph-osd|ceph-fuse|radosgw|rbd-mirror|cephfs-mirror|tcmu-runner' || true endscript missingok notifempty -- 2.47.3