summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Lowell <glowell@inktank.com>2013-02-05 15:20:43 -0800
committerGary Lowell <glowell@inktank.com>2013-02-05 15:20:43 -0800
commit99ea30305498e4f4d6d9dbd458c73da219aafd40 (patch)
treecdc39be0091376ad0bb988662b0e9fbbb347d469
parentc8eace6ff0bbb38bf317b9db2ffba57c3d128693 (diff)
downloadceph-99ea30305498e4f4d6d9dbd458c73da219aafd40.tar.gz
logrotate.conf: Remove unneeded loop and update new rgw version.
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>
-rw-r--r--src/logrotate.conf12
-rw-r--r--src/rgw/logrotate.conf10
2 files changed, 15 insertions, 7 deletions
diff --git a/src/logrotate.conf b/src/logrotate.conf
index 0a4a5a2422a..62101b3a692 100644
--- a/src/logrotate.conf
+++ b/src/logrotate.conf
@@ -13,13 +13,11 @@
if which initctl > /dev/null && [ -x `which initctl` ]; then
# upstart reload isn't very helpful here:
# https://bugs.launchpad.net/upstart/+bug/1012938
- for type in mon osd mds; do
- initctl list \
- | sed -n 's/^\(ceph-\(mon\|osd\|mds\)\+\)[ \t]\+(\([^ \/]\+\)\/\([^ \/]\+\))[ \t]\+start\/.*$/\1 cluster=\3 id=\4/p' \
- | while read l; do
- initctl reload -- $l 2>/dev/null || :
- done
- done
+ initctl list \
+ | sed -n 's/^\(ceph-\(mon\|osd\|mds\)\+\)[ \t]\+(\([^ \/]\+\)\/\([^ \/]\+\))[ \t]\+start\/.*$/\1 cluster=\3 id=\4/p' \
+ | while read l; do
+ initctl reload -- $l 2>/dev/null || :
+ done
fi
endscript
missingok
diff --git a/src/rgw/logrotate.conf b/src/rgw/logrotate.conf
index d34f0d2dd59..ae45e393546 100644
--- a/src/rgw/logrotate.conf
+++ b/src/rgw/logrotate.conf
@@ -9,6 +9,16 @@
elif which service > /dev/null && [ -x `which service` ]; then
service radosgw reload >/dev/null
fi
+ # Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
+ if which initctl > /dev/null && [ -x `which initctl` ]; then
+ # upstart reload isn't very helpful here:
+ # https://bugs.launchpad.net/upstart/+bug/1012938
+ initctl list \
+ | sed -n 's/^\(radosgw\+\)[ \t]\+(\([^ \/]\+\)\/\([^ \/]\+\))[ \t]\+start\/.*$/\1 cluster=\2 id=\3/p' \
+ | while read l; do
+ initctl reload -- $l 2>/dev/null || :
+ done
+ fi
endscript
missingok
}