| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Fixes: http://tracker.ceph.com/issues/51318
Signed-off-by: Venky Shankar <vshankar@redhat.com>
|
|
|
|
| |
Signed-off-by: Mykola Golub <mgolub@suse.com>
|
|
|
|
|
|
| |
there is no killall in centos7 minimal
Signed-off-by: Tianshan Qu <tianshan@xsky.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This still leaves other loggers with un-reopened log files,
unfortunately.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
| |
This is simpler.
Signed-off-by: Sage Weil <sage@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Introduced by 32a6394be0725b4742ebe87d7537b98c7025e4f6.
Signed-off-by: Chris Dunlop <chris@onthe.net.au>
|
|
|
|
| |
Signed-off-by: Tobias Florek <tobias.florek@bytesandbutter.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Sage Weil <sage@newdream.net>
|
|
|
|
| |
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
|
|
|
|
|
|
|
| |
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 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>
|
|
|