diff mbox

Use SSH in "service ceph status -a" to get version

Message ID CACkq2movUWvo1cfdXKSKRyb41rg+OW0N1rpzpRn5_-YSd=oZUg@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Travis Rhoden Aug. 17, 2012, 2:39 a.m. UTC
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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

             elif [ -e "$pid_file" ]; then
                 # daemon is dead, but pid file still exists
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/src/init-ceph.in b/src/init-ceph.in
index a8c5a29..31aeb28 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -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"