To allow users to customize the file if they need to
akter the settings (e.g. to change the rotation interval
or rotate based on size)
Fixes: https://tracker.ceph.com/issues/58527
Signed-off-by: Adam King <adking@redhat.com>
call_throws(ctx, ['systemctl', 'enable', 'ceph-%s.target' % fsid])
call_throws(ctx, ['systemctl', 'start', 'ceph-%s.target' % fsid])
+ # don't overwrite file in order to allow users to manipulate it
+ if os.path.exists(ctx.logrotate_dir + f'/ceph-{fsid}'):
+ return
+
# logrotate for the cluster
with open(ctx.logrotate_dir + '/ceph-%s' % fsid, 'w') as f:
"""