X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fceph-crush-location.in;fp=src%2Fceph%2Fsrc%2Fceph-crush-location.in;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=a8c22a8dcf687236e5396f2e3194f4090d805b35;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/ceph-crush-location.in b/src/ceph/src/ceph-crush-location.in deleted file mode 100755 index a8c22a8..0000000 --- a/src/ceph/src/ceph-crush-location.in +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh -# -# Generate a CRUSH location for the given entity -# -# The CRUSH location consists of a list of key=value pairs, separated -# by spaces, all on a single line. This describes where in CRUSH -# hierarhcy this entity should be placed. -# -# Arguments: -# --cluster name of the cluster (see /etc/ceph/$cluster.conf) -# --type daemon/entity type -# --id id (osd number, mds name, client name) -# - -# if we start up as ./ceph-crush-location, assume everything else is -# in the current directory too. -if [ `dirname $0` = "." ] && [ $PWD != "/usr/bin" ]; then - BINDIR=. - SBINDIR=. - LIBDIR=. - ETCDIR=. -else - BINDIR=@bindir@ - SBINDIR=@prefix@/sbin - LIBDIR=@libdir@/ceph - ETCDIR=@sysconfdir@/ceph -fi - -usage_exit() { - echo "usage: $0 [--cluster ] --id --type " - exit -} - -cluster="ceph" -type="" -id="" -while [ $# -ge 1 ]; do - case $1 in - --cluster | -C) - shift - cluster="$1" - shift - ;; - --id | -i) - shift - id="$1" - shift - ;; - --type | -t) - shift - type="$1" - shift - ;; - *) - echo "unrecognized option '$1'" - usage_exit - ;; - esac -done - -if [ -z "$type" ]; then - echo "must specify entity type" - usage_exit -fi - -if [ -z "$id" ]; then - echo "must specify id" - usage_exit -fi - -# try a generic location -location="$($BINDIR/ceph-conf --cluster=${cluster:-ceph} --name=$type.$id --lookup crush_location || :)" -if [ -n "$location" ]; then - echo $location - exit 0 -fi - -# spit out something generic -echo "host=$(hostname -s) root=default" -