From 86e631b9bad1c97063ea9fc987bcd97593cdf99b Mon Sep 17 00:00:00 2001 From: Vikhyat Umrao Date: Thu, 23 Jul 2015 18:10:06 +0530 Subject: [PATCH] rgw: fix radosgw start-up script. radosgw init script is unable to start radosgw daemon. as it is relies on requiretty being disabled. once init script start this daemon with sudo it fails to start the daemon. changing 'sudo' to 'su', it will fix this issue and will also help running radosgw daemon with our new "ceph" UID project. Fixes upstream: #10927 Fixes downstream: #1238521 Reviewed-by: Ken Dreyer Signed-off-by: Vikhyat Umrao (cherry picked from commit c83542296aeb8f5dd96f5d9e09327e7a89370742) --- src/init-radosgw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init-radosgw b/src/init-radosgw index 25fd346c6dda8..8f33179b9cfb1 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -102,7 +102,7 @@ case "$1" in if [ $DEBIAN -eq 1 ]; then start-stop-daemon --start -u $user -x $RADOSGW -- -n $name elif [ -n "$SYSTEMD_RUN" ]; then - $SYSTEMD_RUN -r sudo -u "$user" bash -c "ulimit -n 32768; $RADOSGW -n $name" + $SYSTEMD_RUN -r su "$user" -c "ulimit -n 32768; $RADOSGW -n $name" else ulimit -n 32768 daemon --user="$user" "$RADOSGW -n $name" -- 2.39.5