]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-radosgw.sysv: set ulimit -n before starting daemon
authorSage Weil <sage@redhat.com>
Wed, 22 Oct 2014 00:59:30 +0000 (17:59 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 14 Jan 2015 23:51:45 +0000 (15:51 -0800)
If we do the ulimit inside the daemon command we will have already
dropped privs and will fail.

Fixes: #9587
Backport: giant, firefly
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 9803cedf54a7baff45ccd0e0f65d2bc220958a46)

src/init-radosgw.sysv

index 06d41f66fdc06de443740b859f0f038684cb727c..2486539af36d68e12da0d0f976c52d235b80ffa8 100644 (file)
@@ -87,8 +87,8 @@ case "$1" in
             if [ $SYSTEMD -eq 1 ]; then
                 systemd-run -r sudo -u "$user" bash -c "ulimit -n 32768; $RADOSGW -n $name"
             else
-                #start-stop-daemon --start -u $user -x $RADOSGW -- -n $name
-                daemon --user="$user" "ulimit -n 32768; $RADOSGW -n $name"
+               ulimit -n 32768
+                daemon --user="$user" "$RADOSGW -n $name"
             fi
             echo "Starting $name..."
         done