Who creates /etc/lograte.d/cephadm in 19.2.2?
Hi, I have a cephadm managed 19.2.2 cluster where logrotate is unable to run because of a configuration conflict. The package ceph-common is installed for all the command line tools and provides /etc/logrotate.d/ceph-common to rotate all logfiles in /var/log. Some process now regularily creates /etc/logrotate.d/cephadm to rotate only /var/log/cephadm.log. And this creates a conflict for logrotate which refuses to run in the end. I tried to remove /etc/logrotate.d/cephadm with rm just to see it reappear after a few minutes. The package cephadm is not installed. I have not seen an entry in the MGR or MON log mentioning the creation of this file. Which process is doing this? Regards -- Robert Sander Linux Consultant Heinlein Consulting GmbH Schwedter Str. 8/9b, 10119 Berlin https://www.heinlein-support.de Tel: +49 30 405051 - 0 Fax: +49 30 405051 - 19 Amtsgericht Berlin-Charlottenburg - HRB 220009 B Geschäftsführer: Peer Heinlein - Sitz: Berlin
Hi Robert, the logrotate file is recreated via cephadm itself (/var/lib/ceph/{FSID}/cephadm.{SOMEHASH}) when it issues its periodic checks every couple of minutes: ---snip--- LOGROTATE_DIR = '/etc/logrotate.d' ... self.logrotate_dir: str = LOGROTATE_DIR ... if not os.path.exists(ctx.logrotate_dir + '/cephadm'): with open(ctx.logrotate_dir + '/cephadm', 'w') as f: f.write("""# created by cephadm /var/log/ceph/cephadm.log { rotate 7 daily compress missingok notifempty su root root } """) ---snip--- Regards, Eugen Zitat von Robert Sander <r.sander@heinlein-support.de>:
Hi,
I have a cephadm managed 19.2.2 cluster where logrotate is unable to run because of a configuration conflict.
The package ceph-common is installed for all the command line tools and provides /etc/logrotate.d/ceph-common to rotate all logfiles in /var/log.
Some process now regularily creates /etc/logrotate.d/cephadm to rotate only /var/log/cephadm.log. And this creates a conflict for logrotate which refuses to run in the end.
I tried to remove /etc/logrotate.d/cephadm with rm just to see it reappear after a few minutes. The package cephadm is not installed.
I have not seen an entry in the MGR or MON log mentioning the creation of this file.
Which process is doing this?
Regards -- Robert Sander Linux Consultant
Heinlein Consulting GmbH Schwedter Str. 8/9b, 10119 Berlin
https://www.heinlein-support.de
Tel: +49 30 405051 - 0 Fax: +49 30 405051 - 19
Amtsgericht Berlin-Charlottenburg - HRB 220009 B Geschäftsführer: Peer Heinlein - Sitz: Berlin _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
Am 4/15/25 um 10:30 schrieb Eugen Block:
if not os.path.exists(ctx.logrotate_dir + '/cephadm'):
Great. So we need an empty file there. Regards -- Robert Sander Linux Consultant Heinlein Consulting GmbH Schwedter Str. 8/9b, 10119 Berlin https://www.heinlein-support.de Tel: +49 30 405051 - 0 Fax: +49 30 405051 - 19 Amtsgericht Berlin-Charlottenburg - HRB 220009 B Geschäftsführer: Peer Heinlein - Sitz: Berlin
participants (2)
-
Eugen Block
-
Robert Sander