summaryrefslogtreecommitdiffstats
path: root/src/logrotate.conf (follow)
Commit message (Collapse)AuthorAgeFilesLines
* logrotate: include cephfs-mirror daemonVenky Shankar2021-06-241-1/+1
| | | | | Fixes: http://tracker.ceph.com/issues/51318 Signed-off-by: Venky Shankar <vshankar@redhat.com>
* logrotate: also sighup rbd-mirrorMykola Golub2020-01-051-1/+1
| | | | Signed-off-by: Mykola Golub <mgolub@suse.com>
* logrotate: add pkill as backup in case of no killallTianshan Qu2017-07-271-1/+1
| | | | | | there is no killall in centos7 minimal Signed-off-by: Tianshan Qu <tianshan@xsky.com>
* logrotate.conf: also sighup the ceph-mgrDan van der Ster2017-04-101-1/+1
| | | | | | | Tell ceph-mgr to reopen its logs postrotate. Fixes: http://tracker.ceph.com/issues/19568 Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
* logrotate: Run as root/cephBoris Ranto2016-08-051-1/+1
| | | | | | | | | | | Currently, we run the logrotate scripts as ceph/ceph but that way we cannot rotate the scripts created by qemu (they are root/ceph and 644). The original su line was introduced in commit 73d7bed9 because logrotate complained that the directory was writable by a non-root group and it needed a su line to supress that error. This way, we keep the group settings and we can access and rotate the qemu logs as well. Signed-off-by: Boris Ranto <branto@redhat.com>
* logrotate.conf: poke ceph-fuse after log rotationSage Weil2016-04-071-1/+1
| | | | | | | This still leaves other loggers with un-reopened log files, unfortunately. Signed-off-by: Sage Weil <sage@redhat.com>
* radosgw: log to /var/log/ceph instead of /var/log/radosgwSage Weil2015-09-161-1/+1
| | | | | | This is simpler. Signed-off-by: Sage Weil <sage@redhat.com>
* logrotate: logs are now owned by ceph:cephDan van der Ster2015-09-151-0/+1
| | | | | | | | | | | Add the su directive to avoid this error during logrotate: error: skipping "/var/log/ceph/ceph-osd.0.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation. Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
* logrotate: ignore exit status 1 from killallDan van der Ster2015-09-111-1/+1
| | | | | | | | | | | | If any of ceph-osd, ceph-mon, ceph-mds were not running then killall -q will exit status 1, leading to anacron sending a mail error: error running shared postrotate script for '/var/log/ceph/*.log ' Fix by overriding the exit status with || true. Fixes: #13033 Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
* logrotate.conf: Simplify log files reopening after log rotationBoris Ranto2015-09-041-22/+1
| | | | | | | | | | | | | | | | | SIGHUP (1) signal makes ceph services reopen its log files so we do not need to call any init scripts magic, here. Additionally, the old approach caused problems with rhel-based systems since it found the service command and tried to reload ceph.service instead of ceph.target. This also caused problems with SELinux as processes with context logrotate_t are not allowed to issue systemctl reload on a process. This patch is also in sync with other logrotate postrotate scripts which do exactly the same thing (send SIGHUP to the daemon). Signed-off-by: Boris Ranto <branto@redhat.com>
* logrotate: fix log rotation with systemdSage Weil2015-08-031-3/+2
| | | | | | | | | | | systemctl does not have a nice way to enumerate (active) units so we can reload them. On centos7, the is-active wildcard syntax does not appear to be supported. On fedora 22, it prints the state only but not which unit the state belongs to. Simply killall -1 instead. Signed-off-by: Sage Weil <sage@redhat.com>
* logrotate.conf: fixes for systemdNathan Cutler2015-06-261-0/+4
| | | | | | | | | | | | | | | | | Before this patch, the command 'logrotate -f /etc/logrotate.d/ceph' was generating an error "Failed to reload ceph.target: Job type reload is not applicable for unit ceph.target". Before we issue systemctl reload, check that there is at least one active ceph-* service. (The hyphen is significant.) Since we use grep, make the grep package a dependency. http://tracker.ceph.com/issues/12173 Fixes: #12173 Signed-off-by: Tim Serong <tserong@suse.com> Signed-off-by: Lars Marowsky-Bree <lmb@suse.com> Signed-off-by: Nathan Cutler <ncutler@suse.com>
* logrotate.conf: prefer service over invoke-rc.dSage Weil2015-04-221-3/+3
| | | | | | | | On trusty 14.04, service works but invoke-rc.d does not (but is present). Fixes: #11330 Reported-by: Wim Heirman <wim@heirman.net> Signed-off-by: Sage Weil <sage@redhat.com>
* logrotate.conf: fix osd log rotation under upstartSage Weil2014-07-181-1/+1
| | | | | | | | | | In commit 7411c3c6a42bef5987bdd76b1812b01686303502 we generalized this enumeration code by copying what was in the upstart scripts. However, while the mon and mds directories get a 'done' file, the OSDs get a 'ready' file. Bah! Trigger off of either one. Backport: firefly Signed-off-by: Sage Weil <sage@redhat.com>
* logrotate improvement: do not rotate empty logsDmitry Smirnov2014-03-271-0/+1
| | | | Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
* logrotate: copy/paste daemon list from *-all-starter.confLoic Dachary2014-03-071-7/+11
| | | | | | | | | | | | | | | | | Each upstart/*-all-starter.conf use the same script to find the list of daemons and their ids. Copy it over to the corresponding logrotate.conf script instead of using a less reliable script based on initctl list output. If logrotate fails to run initctl reload on a daemon, it will keep writing to the rotated log file, even after it is deleted and until it fills the disk. By using the exact same shell snippet as the upstart scripts used to start the daemon, all of them will be sent the HUP signal and reopen the log file that was just rotated. http://tracker.ceph.com/issues/7072 fixes #7072 Signed-off-by: Loic Dachary <loic@dachary.org>
* silence logrotate some moreAlexandre Oliva2013-02-061-3/+3
| | | | | | | | | | | I was getting email with logrotate error output from “which invoke-rc.d” on systems without an invoke-rc.d. This patch silences it. Silence stderr from which when running logrotate From: Alexandre Oliva <oliva@gnu.org> Signed-off-by: Alexandre Oliva <oliva@gnu.org>
* logrotate.conf: Remove unneeded loop and update new rgw version.Gary Lowell2013-02-061-7/+5
| | | | | | | Remove an unneeded for loop from the ceph logrotate.conf, and update the new rgw logrotate.conf to reload the radosgw serivce. Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
* install: remove perl dependencyGary Lowell2013-02-041-1/+1
| | | | | | | Change the filter in logrotate to use sed instead of perl, and remove the package dependency on perl. Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
* logrotate: do not spam stdoutSage Weil2012-12-041-3/+3
| | | | | | | Avoid anything on stdout that will generate cron emails for people. Reported-by: Stefan Priebe <s.priebe@profihost.ag> Signed-off-by: Sage Weil <sage@inktank.com>
* logrotate: fix rotationDavid Zafman2012-11-301-1/+3
| | | | | | | Fixes: #3554 Always reload with Upstart because in some configs the init.d script doesn't work Signed-off-by: David Zafman <david.zafman@inktank.com>
* logrotate on systems without invoke-rc.dAlexandre Oliva2012-11-271-3/+3
| | | | | | | | | The which command doesn't output anything to stdout when it can't find the given program name, and then [ -x ] passes. Use the exit status of which to tell whether the command exists, before testing whether it's executable, to fix it. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* logrotate: fix bash syntaxChris Dunlop2012-10-141-4/+3
| | | | | | Introduced by 32a6394be0725b4742ebe87d7537b98c7025e4f6. Signed-off-by: Chris Dunlop <chris@onthe.net.au>
* logrotate: check for executables to avoid cron errorsTobias Florek2012-10-011-11/+16
| | | | Signed-off-by: Tobias Florek <tobias.florek@bytesandbutter.de>
* logrotate: reload all upstart instancesSage Weil2012-06-211-0/+10
| | | | | | | | upstart doesn't let you wildcard all instances of a given job, so we slog through initctl list output, and reload any running daemons. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Tommi Virtanen <tv@inktank.com>
* add missingok to logrotateLaszlo Boszormenyi2011-11-021-0/+1
| | | | | | | When ceph is not running, it has no logs. Thus logrotate has nothing to rotate. The missingok directive handles this situation. Signed-off-by: Laszlo Boszormenyi <gcs@debian.hu>
* perfcounters: no more stat/ dir, yay!Sage Weil2011-07-251-11/+0
| | | | Signed-off-by: Sage Weil <sage@newdream.net>
* logrotate.conf: Mark stat/*.log as "missingok"; it's not always there.Tommi Virtanen2011-07-051-0/+1
| | | | Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
* Move stat/*.log to the end of logrotate.confAlexandre Oliva2011-07-051-9/+10
| | | | | | | Logrotate ignores entries after a rule that doesn't match any files. Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br> Signed-off-by: Sage Weil <sage@newdream.net>
* logrotate: separate rule for stat/*.logSage Weil2010-11-011-1/+10
| | | | | | | Logrotate seems to ignore the entire rule if any part of the file list is not found. This happens on nodes with only monitors. Signed-off-by: Sage Weil <sage@newdream.net>
* move logrotate conf out of debian/ to fix ceph.specSage Weil2010-08-021-0/+9