]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
init-ceph: use SSH in "service ceph status -a" to get version
authorTravis Rhoden <trhoden@gmail.com>
Mon, 20 Aug 2012 20:29:11 +0000 (13:29 -0700)
committerSage Weil <sage@inktank.com>
Mon, 20 Aug 2012 20:29:11 +0000 (13:29 -0700)
When running "service ceph status -a", a version number was never
returned for remote hosts, only for the local.  This was because
the command to query the version number didn't use the do_cmd
function, which is responsible for running the command over SSH
when needed.

Modify the ceph init.d script to use do_cmd for querying the
Ceph version.

Signed-off-by: Travis Rhoden <trhoden@gmail.com>
src/init-ceph.in

index a8c5a29e8bd65987afd5f1c4fde7132d0893d6bc..31aeb2872236bfccdc9f16a06beb852bc42d9a77 100644 (file)
@@ -298,7 +298,7 @@ for name in $what; do
        status)
            if daemon_is_running $name ceph-$type $id $pid_file; then
                get_conf asok "/var/run/ceph/ceph-$type.$id.asok" "admin socket"
-               version=`$BINDIR/ceph --admin-daemon $asok version 2>/dev/null || echo unknown`
+               version=`do_cmd "$BINDIR/ceph --admin-daemon $asok version 2>/dev/null" || echo unknown`
                 echo "$name: running $version"
             elif [ -e "$pid_file" ]; then
                 # daemon is dead, but pid file still exists