diff options
author | Sage Weil <sage@inktank.com> | 2013-09-07 13:32:40 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-09-07 13:32:40 -0700 |
commit | b16f812362ccb1d9bdd4900d155e248d695ef0d7 (patch) | |
tree | c4d13e0a3999e103b43c1ada729484342205af7a | |
parent | 97a97c3c554f689dd3f987e63eaa2b9c5ec1dd0a (diff) | |
parent | 5f16ea62cee4fad9be6e44f3562da31908303ae5 (diff) | |
download | ceph-b16f812362ccb1d9bdd4900d155e248d695ef0d7.tar.gz |
Merge pull request #573 from dalgaaf/fix/da-cuttlefish-fixes-and-cherry-picks
Cherry-pick some smaller changes from master to cuttlefish
Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/ceph_authtool.cc | 10 | ||||
-rw-r--r-- | src/init-radosgw | 66 | ||||
-rw-r--r-- | src/init-radosgw.sysv | 10 | ||||
-rw-r--r-- | src/tools/ceph.cc | 1 |
4 files changed, 55 insertions, 32 deletions
diff --git a/src/ceph_authtool.cc b/src/ceph_authtool.cc index 3075d9c69a7..f66a3c66eee 100644 --- a/src/ceph_authtool.cc +++ b/src/ceph_authtool.cc @@ -36,9 +36,15 @@ void usage() << " 'mount -o secret=..' argument\n" << " -C, --create-keyring will create a new keyring, overwriting any\n" << " existing keyringfile\n" - << " --gen-key will generate a new secret key for the\n" + << " -g, --gen-key will generate a new secret key for the\n" << " specified entityname\n" - << " --add-key will add an encoded key to the keyring\n" + << " --gen-print-key will generate a new secret key without set it\n" + << " to the keyringfile, prints the secret to stdout\n" + << " --import-keyring will import the content of a given keyring\n" + << " into the keyringfile\n" + << " -u, --set-uid sets the auid (authenticated user id) for the\n" + << " specified entityname\n" + << " -a, --add-key will add an encoded key to the keyring\n" << " --cap subsystem capability will set the capability for given subsystem\n" << " --caps capsfile will set all of capabilities associated with a\n" << " given key, for all subsystems" diff --git a/src/init-radosgw b/src/init-radosgw index 8fe986d6a26..d5544fad0c5 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -33,44 +33,44 @@ fi case "$1" in start) - for name in `ceph-conf --list-sections $PREFIX`; - do - auto_start=`ceph-conf -n $name 'auto start'` - if [ "$auto_start" = "no" ] || [ "$auto_start" = "false" ] || [ "$auto_start" = "0" ]; then - continue - fi + for name in `ceph-conf --list-sections $PREFIX`; + do + auto_start=`ceph-conf -n $name 'auto start'` + if [ "$auto_start" = "no" ] || [ "$auto_start" = "false" ] || [ "$auto_start" = "0" ]; then + continue + fi # is the socket defined? if it's not, this instance shouldn't run as a daemon. - rgw_socket=`ceph-conf -n $name 'rgw socket path'` - if [ -z "$rgw_socket" ]; then - continue - fi + rgw_socket=`ceph-conf -n $name 'rgw socket path'` + if [ -z "$rgw_socket" ]; then + continue + fi # mapped to this host? - host=`ceph-conf -n $name host` - if [ "$host" != `hostname` ]; then - continue - fi + host=`ceph-conf -n $name host` + if [ "$host" != `hostname` ]; then + continue + fi - user=`ceph-conf -n $name user` - if [ -z "$user" ]; then - user="$DEFAULT_USER" - fi + user=`ceph-conf -n $name user` + if [ -z "$user" ]; then + user="$DEFAULT_USER" + fi - log_file=`ceph-conf -n $name log_file` - if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then - touch "$log_file" - chown $user $log_file - fi + log_file=`ceph-conf -n $name log_file` + if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then + touch "$log_file" + chown $user $log_file + fi echo "Starting $name..." - start-stop-daemon --start -u $user -x $RADOSGW -- -n $name - done + start-stop-daemon --start -u $user -x $RADOSGW -- -n $name + done ;; reload) - echo "Reloading $name..." - start-stop-daemon --stop --signal HUP -x $RADOSGW --oknodo - ;; + echo "Reloading $name..." + start-stop-daemon --stop --signal HUP -x $RADOSGW --oknodo + ;; restart|force-reload) $0 stop $0 start @@ -78,8 +78,16 @@ case "$1" in stop) start-stop-daemon --stop -x $RADOSGW --oknodo ;; + status) + if pidof $RADOSGW >/dev/null; then + echo "$RADOSGW is running." + else + echo "$RADOSGW is not running." + exit 1 + fi + ;; *) - echo "Usage: $0 start|stop|restart" >&2 + echo "Usage: $0 start|stop|restart|force-reload|reload|status" >&2 exit 3 ;; esac diff --git a/src/init-radosgw.sysv b/src/init-radosgw.sysv index aa76fb9e849..2a748e40018 100644 --- a/src/init-radosgw.sysv +++ b/src/init-radosgw.sysv @@ -84,8 +84,16 @@ case "$1" in killproc $RADOSGW echo "Stopping radosgw..." ;; + status) + if pidof $RADOSGW >/dev/null; then + echo "$RADOSGW is running." + else + echo "$RADOSGW is not running." + exit 1 + fi + ;; *) - echo "Usage: $0 start|stop|restart" >&2 + echo "Usage: $0 start|stop|restart|force-reload|reload|status" >&2 exit 3 ;; esac diff --git a/src/tools/ceph.cc b/src/tools/ceph.cc index 49a0a0eced7..ffb7936ad12 100644 --- a/src/tools/ceph.cc +++ b/src/tools/ceph.cc @@ -103,6 +103,7 @@ static void usage() cout << " ceph osd reweight <osd-id> <weight>\n"; cout << " ceph osd blacklist add <address>[:source_port] [time]\n"; cout << " ceph osd blacklist rm <address>[:source_port]\n"; + cout << " ceph osd lspools\n"; cout << " ceph osd pool mksnap <pool> <snapname>\n"; cout << " ceph osd pool rmsnap <pool> <snapname>\n"; cout << " ceph osd pool create <pool> <pg_num> [<pgp_num>]\n"; |