]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
ceph: -W as shorthand for --watch-channel
authorSage Weil <sage@redhat.com>
Tue, 25 Feb 2020 22:34:53 +0000 (16:34 -0600)
committerSage Weil <sage@redhat.com>
Thu, 27 Feb 2020 18:05:42 +0000 (12:05 -0600)
'ceph -w' to watch default cluster channel
'ceph -W foo' to watch channel 'foo'

Signed-off-by: Sage Weil <sage@redhat.com>
doc/man/8/ceph.rst
src/ceph.in

index 7c98629637f01506ba778910d9e2fd1bc8c4e8f5..4cdbd737a3603dc319921d92ab97484f0af1c2b6 100644 (file)
@@ -1575,7 +1575,11 @@ Options
 
 .. option:: -w, --watch
 
-       Watch live cluster changes.
+       Watch live cluster changes on the default 'cluster' channel
+
+.. option:: -W, --watch-channel
+
+       Watch live cluster changes on any channel (cluster, audit, cephadm, or * for all)
 
 .. option:: --watch-debug
 
index 014e49166a6f8c507739c8451463aaaa0e63117d..34b6c468b73ea89da468e5daa18b61ebfc85aada 100755 (executable)
@@ -323,10 +323,9 @@ def parse_cmdargs(args=None, target=''):
     parser.add_argument('--watch-error', action='store_true',
                         help='watch error events')
 
-    parser.add_argument('--watch-channel', dest="watch_channel",
-                        help="log channel to follow " \
-                        "when using -w/--watch; '*' for all",
-                        default='cluster')
+    parser.add_argument('-W', '--watch-channel', dest="watch_channel",
+                        help="watch live cluster changes on a specific channel "
+                        "(e.g., cluster, audit, cephadm, or '*' for all)")
 
     parser.add_argument('--version', '-v', action="store_true", help="display version")
     parser.add_argument('--verbose', action="store_true", help="make verbose")
@@ -914,6 +913,12 @@ def main():
             CEPH_RELEASE_TYPE))  # noqa
         return 0
 
+    # --watch-channel|-W implies -w
+    if parsed_args.watch_channel:
+        parsed_args.watch = True
+    elif parsed_args.watch and not parsed_args.watch_channel:
+        parsed_args.watch_channel = 'cluster'
+
     global verbose
     verbose = parsed_args.verbose