From: Sage Weil Date: Thu, 7 May 2015 22:29:11 +0000 (-0700) Subject: init-radosgw: look in /var/lib/ceph/radosgw X-Git-Tag: v0.94.4~2^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2a733e9e720bcdb8ea342a96be679d6f9efa3b2b;p=ceph.git init-radosgw: look in /var/lib/ceph/radosgw Signed-off-by: Sage Weil (cherry picked from commit a4bb992426b39188e750fce9198052ca0d510117) --- diff --git a/src/init-radosgw b/src/init-radosgw index cca92290e0387..c0a0bd1ad7918 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -43,22 +43,37 @@ if [ ! -x "$RADOSGW" ]; then exit 1 fi +# list daemons, old-style and new-style +# NOTE: no support for cluster names that aren't "ceph" +dlist=`ceph-conf --list-sections $PREFIX` +if [ -d "/var/lib/ceph/radosgw" ]; then + for d in `ls /var/lib/ceph/radosgw | grep ^ceph-`; do + if [ -e "/var/lib/ceph/radosgw/$d/sysvinit" ]; then + id=`echo $d | cut -c 6-` + dlist="client.$id $dlist" + fi + done +fi + case "$1" in start) - for name in `ceph-conf --list-sections $PREFIX`; + for name in $dlist do auto_start=`ceph-conf -n $name 'auto start'` if [ "$auto_start" = "no" ] || [ "$auto_start" = "false" ] || [ "$auto_start" = "0" ]; then continue fi - # mapped to this host? - host=`ceph-conf -n $name host` - hostname=`hostname -s` - if [ "$host" != "$hostname" ]; then - [ $VERBOSE -eq 1 ] && echo "hostname $hostname could not be found in ceph.conf:[$name], not starting." - continue - fi + shortname=`echo $name | cut -c 8-` + if [ ! -e "/var/lib/ceph/radosgw/ceph-$shortname/sysvinit" ]; then + # mapped to this host? + host=`ceph-conf -n $name host` + hostname=`hostname -s` + if [ "$host" != "$hostname" ]; then + [ $VERBOSE -eq 1 ] && echo "hostname $hostname could not be found in ceph.conf:[$name], not starting." + continue + fi + fi user=`ceph-conf -n $name user` if [ -z "$user" ]; then @@ -88,7 +103,7 @@ case "$1" in ;; stop) timeout=0 - for name in `ceph-conf --list-sections $PREFIX`; + for name in $dlist do t=`$RADOSGW -n $name --show-config-value rgw_exit_timeout_secs` if [ $t -gt $timeout ]; then timeout=$t; fi