Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force mlaunch --csrs when "version" is 0.0.0 #576

Merged
merged 1 commit into from
Mar 11, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions mtools/mlaunch/mlaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,14 +567,16 @@ def init(self):

# Exit with error if --csrs is set and MongoDB < 3.1.0
if (self.args['csrs'] and
LooseVersion(current_version) < LooseVersion("3.1.0")):
LooseVersion(current_version) < LooseVersion("3.1.0") and
LooseVersion(current_version) != LooseVersion("0.0.0")):
errmsg = (" \n * The '--csrs' option requires MongoDB version "
"3.2.0 or greater, the current version is %s.\n"
% current_version)
raise SystemExit(errmsg)

# add the 'csrs' parameter as default for MongoDB >= 3.3.0
if LooseVersion(current_version) >= LooseVersion("3.3.0"):
if (LooseVersion(current_version) >= LooseVersion("3.3.0") or
LooseVersion(current_version) == LooseVersion("0.0.0")):
self.args['csrs'] = True

# construct startup strings
Expand Down