From: Michael Fritch Date: Mon, 27 Jan 2020 14:21:53 +0000 (-0700) Subject: cephadm: remove `logs` command X-Git-Tag: v15.1.0~29^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F32752%2Fhead;p=ceph.git cephadm: remove `logs` command Fixes: https://tracker.ceph.com/issues/43618 Signed-off-by: Michael Fritch --- diff --git a/qa/workunits/cephadm/test_cephadm.sh b/qa/workunits/cephadm/test_cephadm.sh index 2233610b8627..ba1af1340613 100755 --- a/qa/workunits/cephadm/test_cephadm.sh +++ b/qa/workunits/cephadm/test_cephadm.sh @@ -253,12 +253,6 @@ $CEPHADM enter --fsid $FSID --name mgr.x -- pidof ceph-mgr expect_false $CEPHADM --timeout 1 enter --fsid $FSID --name mon.a -- sleep 10 $CEPHADM --timeout 10 enter --fsid $FSID --name mon.a -- sleep 1 -## logs -expect_false $CEPHADM logs -expect_false $CEPHADM logs --fsid $FSID --name mon.z -$CEPHADM logs --fsid $FSID --name mon.a -expect_false $CEPHADM --timeout 1 logs --fsid $FSID --name mon.a -f - ## ceph-volume $CEPHADM ceph-volume --fsid $FSID -- inventory --format=json \ | jq '.[]' diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 8a9abdc21b9b..fa6203e9c8ea 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2134,24 +2134,6 @@ def command_unit(): ################################## -@infer_fsid -def command_logs(): - # type: () -> int - if not args.fsid: - raise Error('must pass --fsid to specify cluster') - cmd = [str(container_path), 'logs'] # type: List[str] - if args.follow: - cmd.append('-f') - if args.tail: - cmd.append('--tail=' + str(args.tail)) - cmd.append('ceph-%s-%s' % (args.fsid, args.name)) - - # call this directly, without our wrapper, so that we get an unmolested - # stdout with logger prefixing. - return call_timeout(cmd, args.timeout) - -################################## - def command_ls(): # type: () -> None ls = list_daemons(detail=not args.no_detail, @@ -2667,24 +2649,6 @@ def _get_parser(): required=True, help='daemon name (type.id)') - parser_logs = subparsers.add_parser( - 'logs', help='fetch the log for a daemon\'s container') - parser_logs.set_defaults(func=command_logs) - parser_logs.add_argument( - '--fsid', - help='cluster FSID') - parser_logs.add_argument( - '--name', '-n', - required=True, - help='daemon name (type.id)') - parser_logs.add_argument( - '-f', '--follow', - action='store_true', - help='Follow log output') - parser_logs.add_argument( - '--tail', - help='Output the specified number of lines at the end of the log') - parser_bootstrap = subparsers.add_parser( 'bootstrap', help='bootstrap a cluster (mon + mgr daemons)') parser_bootstrap.set_defaults(func=command_bootstrap)