From: Sage Weil Date: Tue, 25 Feb 2020 22:34:53 +0000 (-0600) Subject: ceph: -W as shorthand for --watch-channel X-Git-Tag: v15.1.1~212^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=48691b582ba7ccbd5ab72b1a81d5d307f0c4e311;p=ceph-ci.git ceph: -W as shorthand for --watch-channel 'ceph -w' to watch default cluster channel 'ceph -W foo' to watch channel 'foo' Signed-off-by: Sage Weil --- diff --git a/doc/man/8/ceph.rst b/doc/man/8/ceph.rst index 7c98629637f..4cdbd737a36 100644 --- a/doc/man/8/ceph.rst +++ b/doc/man/8/ceph.rst @@ -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 diff --git a/src/ceph.in b/src/ceph.in index 014e49166a6..34b6c468b73 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -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