summaryrefslogtreecommitdiffstats
path: root/src/logrotate.conf
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2012-06-21 21:42:53 +0200
committerSage Weil <sage@inktank.com>2012-06-21 21:43:00 +0200
commit448f5b02b10f76cc2cd93558a92d7690d60fb74b (patch)
treea616ecc7b86a56ead31519436fe458f3518ca283 /src/logrotate.conf
parentMerge remote-tracking branch 'gh/stable' into next (diff)
downloadceph-448f5b02b10f76cc2cd93558a92d7690d60fb74b.tar.xz
ceph-448f5b02b10f76cc2cd93558a92d7690d60fb74b.zip
logrotate: reload all upstart instances
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>
Diffstat (limited to 'src/logrotate.conf')
-rw-r--r--src/logrotate.conf10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/logrotate.conf b/src/logrotate.conf
index 3ff5d687b9f..ba7e1766693 100644
--- a/src/logrotate.conf
+++ b/src/logrotate.conf
@@ -5,6 +5,16 @@
sharedscripts
postrotate
invoke-rc.d ceph reload >/dev/null || service ceph reload >/dev/null
+
+ # upstart reload isn't very helpful here:
+ # https://bugs.launchpad.net/upstart/+bug/1012938
+ for type in mon osd mds; do
+ initctl list \
+ | perl -ne 'print "$+{service} cluster=$+{cluster} id=$+{id}\n" if m{^(?<service>ceph-(mon|osd|mds)+)\s+\((?<cluster>[^/)]+)/(?<id>[^)]+)\) start/}' \
+ | while read l; do
+ initctl reload -- $l 2>/dev/null || :
+ done
+ done
endscript
missingok
}