rueckstiess / mtools

A collection of scripts to set up MongoDB test environments and parse and visualize MongoDB log files.
Apache License 2.0
1.89k stars 403 forks source link

Passing `--dbpath` to mlaunch causes broken `mongod` invocation #896

Open autarch opened 2 years ago

autarch commented 2 years ago

Expected behavior

If I pass --dbpath foo I'd expect this to be passed through as is.

Actual/current behavior

I end up with this:

mlaunch init --single --dbpath mongodb/db_files
Detected mongod version: 6.0.2
b'Error parsing command line:  Multiple occurrences of option "--dbpath"\ntry \'mongod --help\' for more information\n'

can't start process, return code 2. tried to launch: "mongod"  --dbpath "/home/autarch/projects/mongo-tools/data/db" --logpath "/home/autarch/projects/mongo-tools/data/mongod.log" --port 27017 --fork  --dbpath "mongodb/db_files"  --wiredTigerCacheSizeGB 1 

As an aside, that "Error parsing command line" bit is also weird.

Steps to reproduce the actual/current behavior

See above

Environment

Software Version
mtools 1.7.2
Python 3.10.6
MongoDB server Any
Operating system Linux