Skip to content

Commit 920b20a

Browse files
committed
MB-41999: [BP] Make -P optional in kv_trace_dump
That allows kv_trace_dump to use the CB_PASSWORD env var in the invocation to mcctl. Change-Id: I352c17f066d12f8c6f520103deb100450f75b5cc Reviewed-on: http://review.couchbase.org/c/kv_engine/+/139481 Reviewed-by: Dave Rigby <[email protected]> Tested-by: Build Bot <[email protected]> Well-Formed: Build Bot <[email protected]>
1 parent c45e701 commit 920b20a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

engines/ep/management/kv_trace_dump

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ parser.add_argument('--mcctl', help='Path to mcctl binary')
3535
parser.add_argument('-H', '--hostname', required=True,
3636
help='host:port to connect to (e.g. localhost:11210)')
3737
parser.add_argument('-u', '--username', required=True, help='Username')
38-
parser.add_argument('-P', '--password', required=True, help='Password')
38+
parser.add_argument('-P', '--password', required=False, help='Password')
3939
parser.add_argument('-n', '--norestart', dest='restart', action='store_false',
4040
help="Don't restart tracing after dumping the trace file")
4141
parser.add_argument('outfile', type=argparse.FileType('w'))
@@ -61,8 +61,10 @@ if not os.path.isfile(mcctl_bin):
6161

6262
mcctl_args = [mcctl_bin,
6363
'-h', args.hostname,
64-
'-u', args.username,
65-
'-P', args.password]
64+
'-u', args.username]
65+
66+
if args.password:
67+
mcctl_args.extend(['-P', args.password])
6668

6769
subprocess.check_call(mcctl_args + ['set', 'trace.stop'])
6870
uuid = check_output(mcctl_args + ['get', 'trace.dump.begin'])

0 commit comments

Comments
 (0)