]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: make ceph -w output 'ceph status' first
authorDan Mick <dan.mick@inktank.com>
Thu, 30 May 2013 00:36:28 +0000 (17:36 -0700)
committerDan Mick <dan.mick@inktank.com>
Tue, 4 Jun 2013 00:30:41 +0000 (17:30 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
src/ceph

index cedfec1f73d4b59ace1cdb126f445a9142ac23e9..201b7d5a4c6a6a448c8a938b50301eaf0a4f67e0 100755 (executable)
--- a/src/ceph
+++ b/src/ceph
@@ -1366,7 +1366,14 @@ def main():
                 level = k.replace('watch_', '')
     if level:
         def watch_cb(arg, line, who, stamp_sec, stamp_nsec, seq, level, msg):
-            print >> sys.stderr, line
+            print line
+
+        # first do a ceph status
+        ret, outbuf, outs = json_command(prefix='status')
+        if ret:
+            print >> sys.stderr, "status query failed: ", outs
+            return ret
+        print outbuf
 
         # this instance keeps the watch connection alive, but is
         # otherwise unused