mirror of
https://github.com/ceph/ceph
synced 2025-04-01 00:26:47 +00:00
logrotate.conf: fix osd log rotation under upstart
In commit 7411c3c6a4
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>
This commit is contained in:
parent
2c4f22faa6
commit
14a9ca602f
@ -14,7 +14,7 @@
|
||||
for daemon in osd mon mds ; do
|
||||
find -L /var/lib/ceph/$daemon/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \
|
||||
| while read f; do
|
||||
if [ -e "/var/lib/ceph/$daemon/$f/done" ] && [ -e "/var/lib/ceph/$daemon/$f/upstart" ] && [ ! -e "/var/lib/ceph/$daemon/$f/sysvinit" ]; then
|
||||
if [ -e "/var/lib/ceph/$daemon/$f/done" -o -e "/var/lib/ceph/$daemon/$f/ready" ] && [ -e "/var/lib/ceph/$daemon/$f/upstart" ] && [ ! -e "/var/lib/ceph/$daemon/$f/sysvinit" ]; then
|
||||
cluster="${f%%-*}"
|
||||
id="${f#*-}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user