From: Gary Lowell Date: Tue, 5 Feb 2013 23:20:43 +0000 (-0800) Subject: logrotate.conf: Remove unneeded loop and update new rgw version. X-Git-Tag: v0.58~138^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=99ea30305498e4f4d6d9dbd458c73da219aafd40;p=ceph.git 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 --- diff --git a/src/logrotate.conf b/src/logrotate.conf index 0a4a5a2422a4..62101b3a6928 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 d34f0d2dd59e..ae45e3935469 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 }