From ea52014ebe2ba3a957b4359986e713f0f31fe0e3 Mon Sep 17 00:00:00 2001 From: Guang Yang Date: Thu, 22 Oct 2015 05:33:08 +0000 Subject: [PATCH] rgw: support core file limit for radosgw daemon 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 --- src/init-radosgw | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/init-radosgw b/src/init-radosgw index b7569a0aecc38..76dc0086812b2 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -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 -- 2.39.5