Bug #4571

el6: RGW init script failure

Added by Alexandre Marangone about 7 years ago. Updated almost 7 years ago.

Target version:
% Done:


3 - minor
Affected Versions:
Pull request ID:
Crash signature:


The current radosgw init script provided with CentOS package uses Debian specific init-functions.

The default apache user also differs from Debian (www-data) to CentOS (apache).

init-radosgw.sysv.diff View (973 Bytes) Alexandre Marangone, 03/29/2013 12:54 PM


#1 Updated by Anonymous about 7 years ago

There is a centos init script in the ceph wip-init-radosgw. It's ready to go, just needs review.

#2 Updated by Ian Colle about 7 years ago

  • Status changed from New to Fix Under Review
  • Assignee set to Anonymous

#3 Updated by Ian Colle about 7 years ago

  • Assignee changed from Anonymous to Alexandre Marangone

Alexandre - can you review Gary's fix and see if it resolves this issue?

#4 Updated by Alexandre Marangone about 7 years ago

bash -x is set.
ceph-conf is called, ceph (no ceph-common for EL) package is not set as a radosgw dependency.

There is a difference in process owner between Debian and EL.
Debian launches the radosgw as root, EL as apache user, which seems odd based on the Debian startup script (I'm not very efficient with init-function if I'm honest).
This means that whatever path your rgw socket is in should have the correct permission for the apache user.
Is there a particular security risk associated with running the rgw as root?

Gary, ping me anytime if you want more info.

#5 Updated by Alexandre Marangone about 7 years ago

I was puzzled by this so I took a look further:

The -u or --user option for start-stop-daemon do not launch the process as the user specified, it is the role of the -c (--chuid).

The -u option is used to check if the process is already running with a user specified by -u. If this is the case, you will get a nice '<process> already running'.

On Debian, the check is wrong since we launch with user root and check against user www-data. The fix is either:
start-stop-daemon --start -u root -x $RADOSGW -- -n $name #if we want to launch the process as root, or
start-stop-daemon --start -u $user -c $user -x $RADOSGW -- -n $name #if we wan to launch the process as www-data

On CentOS, the check is done by checking if the PID file exists.

#6 Updated by Anonymous about 7 years ago

The wip-init-radosgw has been updated by removing -x bash option, and by adding ceph as a dependency for the radosgw package. Brnach has also been rebased to master. Will followup on remaining issues in the morning.

#7 Updated by Alexandre Marangone about 7 years ago

Seems like the branch failed to build.
I tested the init script by pulling it from git.
It works.

Forgot to mention yesterday that there is a cosmetic issue because echos are before the call to daemon.

I attached a small diff that fixes it.

#8 Updated by Greg Farnum about 7 years ago

I don't think we want ceph to be a dependency for the radosgw package, do we? It should be possible to install separately as a lot of users put it on separate nodes from any other Ceph things.

#9 Updated by Ian Colle about 7 years ago

  • Project changed from rgw to devops
  • Assignee changed from Alexandre Marangone to Anonymous

Gary - please review this

#10 Updated by Ian Colle about 7 years ago

  • Target version set to v0.61 - Cuttlefish

#11 Updated by Anonymous almost 7 years ago

  • Status changed from Fix Under Review to Resolved

Resolved with the following commit to next:

commit 61a900788b627eac9349ec337e210a130916706d
Author: Gary Lowell <>
Date: Tue Feb 19 17:25:27 2013 -0800

init-radosgw.sysv:  New radosgw init file for rpm based systems
Added init-radosgw.sys file for rpm based systems, added it to
the tarball list in the makefile, and updated the specfile to
install it. Also added the a dependency in ceph since it uses
utility routes from that package (On debian systems these are
packaged in ceph-common). Incorporated review comments from
Alex. (Bug #4571)
Signed-off-by: Gary Lowell  &lt;&gt;
Reviewed-by: Alexandre Marangone &lt;&gt;

Also available in: Atom PDF