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>
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
}