]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: support core file limit for radosgw daemon 6346/head
authorGuang Yang <yguang@yahoo-inc.com>
Thu, 22 Oct 2015 05:33:08 +0000 (05:33 +0000)
committerGuang Yang <yguang@yahoo-inc.com>
Thu, 22 Oct 2015 05:33:08 +0000 (05:33 +0000)
When calling daemon function, the default is to disable the core dump
by setting the core file limit as 0, we provide a configuration in
ceph.conf to explicity configure the core file size.

Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
src/init-radosgw

index b7569a0aecc38f960e6f65d4c2a20896f9cb647f..76dc0086812b284ec106a87c5af5e61fa3cb2e50 100644 (file)
@@ -104,7 +104,11 @@ case "$1" in
            elif [ -n "$SYSTEMD_RUN" ]; then
                 $SYSTEMD_RUN -r su "$user" -c "ulimit -n 32768; $RADOSGW -n $name"
             else
-               ulimit -n 32768
+                ulimit -n 32768
+                core_limit=`ceph-conf -n $name 'core file limit'`
+                if [ -z $core_limit ]
+                    DAEMON_COREFILE_LIMIT=$core_limit
+                fi
                 daemon --user="$user" "$RADOSGW -n $name"
             fi
         done