Skip to content

Commit 6e63eb4

Browse files
committed
MB-43076: [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: Iea3eda21f183574b84106c86e73ff0413e3b1b79 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/141852 Well-Formed: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]> Tested-by: Paolo Cocchi <[email protected]>
1 parent ebb4a08 commit 6e63eb4

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
@@ -31,7 +31,7 @@ parser.add_argument('--mcctl', help='Path to mcctl binary')
3131
parser.add_argument('-H', '--hostname', required=True,
3232
help='host:port to connect to (e.g. localhost:11210)')
3333
parser.add_argument('-u', '--username', required=True, help='Username')
34-
parser.add_argument('-P', '--password', required=True, help='Password')
34+
parser.add_argument('-P', '--password', required=False, help='Password')
3535
parser.add_argument('-n', '--norestart', dest='restart', action='store_false',
3636
help="Don't restart tracing after dumping the trace file")
3737
parser.add_argument('outfile', type=argparse.FileType('w'))
@@ -67,8 +67,10 @@ if not os.path.isfile(mcctl_bin):
6767

6868
mcctl_args = [mcctl_bin,
6969
'-h', args.hostname,
70-
'-u', args.username,
71-
'-P', args.password]
70+
'-u', args.username]
71+
72+
if args.password:
73+
mcctl_args.extend(['-P', args.password])
7274

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

0 commit comments

Comments
 (0)