]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
logrotate.conf: Remove unneeded loop and update new rgw version.
authorGary Lowell <glowell@inktank.com>
Tue, 5 Feb 2013 23:20:43 +0000 (15:20 -0800)
committerGary Lowell <glowell@inktank.com>
Tue, 5 Feb 2013 23:20:43 +0000 (15:20 -0800)
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>
src/logrotate.conf
src/rgw/logrotate.conf

index 0a4a5a2422a44e2db488fd51611e7ef7984ff414..62101b3a6928b0fb8f5271d9c15292f6836aa22d 100644 (file)
         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
index d34f0d2dd59e6cd18f3db2fb31b25ef3f90bca1c..ae45e39354698b345faa8d66a9b1aa124362c42e 100644 (file)
@@ -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
 }