]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph.in: refuse 'ceph <type> tell' commands; suggest 'ceph tell <type>'
authorDan Mick <dan.mick@inktank.com>
Thu, 13 Jun 2013 22:48:32 +0000 (15:48 -0700)
committerDan Mick <dan.mick@inktank.com>
Thu, 13 Jun 2013 22:56:52 +0000 (15:56 -0700)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/ceph.in

index dcb120931ca6233d77d1fff2392d542a37357bde..a650400687031d67361e6543c613d807e827223e 100755 (executable)
@@ -1,4 +1,4 @@
-#
+#&
 # Processed in Makefile to add python #! line and version variable
 #
 #
@@ -1454,6 +1454,14 @@ def main():
     if '--' in childargs:
         childargs.remove('--')
 
+    # special deprecation warning for 'ceph <type> tell'
+    # someday 'mds' will be here too
+    if len(childargs) >= 2 and \
+        childargs[0] in ['mon', 'osd'] and \
+        childargs[1] == 'tell':
+        print >> sys.stderr, '"{0} tell" is deprecated; try "tell {0}.<id>" instead (id can be "*") '.format(childargs[0])
+        return 1
+
     try:
         cluster_handle.connect()
     except KeyboardInterrupt: