]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Add a verbose argument and some verbosity 811/head
authorDavid Moreau Simard <dmsimard@iweb.com>
Tue, 5 Nov 2013 17:02:47 +0000 (12:02 -0500)
committerDavid Moreau Simard <dmsimard@iweb.com>
Tue, 5 Nov 2013 17:07:18 +0000 (12:07 -0500)
This allows a user to use "-v|--verbose" to get some insight as to
what could be preventing radosgw from starting properly.

Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
doc/radosgw/troubleshooting.rst
src/init-radosgw
src/init-radosgw.sysv

index 9c63742cb97162851473f25f50ea3fa9aa80b199..918d0a30a5face5e68e1ea90a636d89642584577 100644 (file)
@@ -17,6 +17,14 @@ the startup script is trying to start the process as a
 ``www-data`` or ``apache`` user and an existing ``.asok`` is 
 preventing the script from starting the daemon.
 
+The radosgw init script (/etc/init.d/radosgw) also has a verbose argument that
+can provide some insight as to what could be the issue:
+
+  /etc/init.d/radosgw start -v
+
+or
+
+  /etc/init.d radosgw start --verbose
 
 HTTP Request Errors
 ===================
index d3e2633e41c1ebbee1300ffdb8f0e5f201e039ad..caa05cb5cc4d10145dc0c7594c90dcc6f696dc86 100644 (file)
@@ -23,6 +23,13 @@ daemon_is_running() {
     fi
 }
 
+VERBOSE=0
+for opt in $*; do
+    if [ "$opt" = "-v" ] || [ "$opt" = "--verbose" ]; then
+       VERBOSE=1
+    fi
+done
+
 # prefix for radosgw instances in ceph.conf
 PREFIX='client.radosgw.'
 
@@ -31,6 +38,7 @@ DEFAULT_USER='www-data'
 
 RADOSGW=`which radosgw`
 if [ ! -x "$RADOSGW" ]; then
+    [ $VERBOSE -eq 1 ] && echo "$RADOSGW could not start, it is not executable."
     exit 1
 fi
 
@@ -51,7 +59,9 @@ case "$1" in
 
             # mapped to this host?
             host=`ceph-conf -n $name host`
-            if [ "$host" != `hostname -s` ]; then
+            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
 
@@ -86,7 +96,7 @@ case "$1" in
         daemon_is_running $RADOSGW
         ;;
     *)
-        echo "Usage: $0 start|stop|restart|force-reload|reload|status" >&2
+        echo "Usage: $0 {start|stop|restart|force-reload|reload|status} [-v|--verbose]" >&2
         exit 3
         ;;
 esac
index d3015b28425208d919ff5ea4fc2feec06206361a..869cc18e7dae4d6552ae630860738eb28d8a3154 100644 (file)
@@ -24,6 +24,13 @@ daemon_is_running() {
     fi
 }
 
+VERBOSE=0
+for opt in $*; do
+    if [ "$opt" = "-v" ] || [ "$opt" = "--verbose" ]; then
+       VERBOSE=1
+    fi
+done
+
 # prefix for radosgw instances in ceph.conf
 PREFIX='client.radosgw.'
 
@@ -33,6 +40,7 @@ DEFAULT_USER='apache'
 
 RADOSGW=`which radosgw`
 if [ ! -x "$RADOSGW" ]; then
+    [ $VERBOSE -eq 1 ] && echo "$RADOSGW could not start, it is not executable."
     exit 1
 fi
 
@@ -54,7 +62,9 @@ case "$1" in
 
             # mapped to this host?
             host=`ceph-conf -n $name host`
-            if [ "$host" != `hostname -s` ]; then
+            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
 
@@ -93,7 +103,7 @@ case "$1" in
         daemon_is_running $RADOSGW
         ;;
     *)
-        echo "Usage: $0 start|stop|restart|force-reload|reload|status" >&2
+        echo "Usage: $0 {start|stop|restart|force-reload|reload|status} [-v|--verbose]" >&2
         exit 3
         ;;
 esac