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

Update default config file to YAML format #231

Merged
merged 1 commit into from
Mar 21, 2017

Conversation

omron93
Copy link
Contributor

@omron93 omron93 commented Mar 13, 2017

Update default config file to YAML format which was introduced in MongoDB 2.6.

Few changes:

@bparees Please take a look.

Resolves: #197

@omron93
Copy link
Contributor Author

omron93 commented Mar 13, 2017

[test-openshift]

@omron93
Copy link
Contributor Author

omron93 commented Mar 14, 2017

[test][test-openshift]

@omron93
Copy link
Contributor Author

omron93 commented Mar 14, 2017

Fixed problem, that 2.6 has only one storage engine (so mmapv1 options are not separated). Please review...
[test-openshift]

export MONGODB_PREALLOC="false"
else
export MONGODB_PREALLOC="true"
fi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should probably surround this block w/ a check to see if MONGODB_PREALLOC is set and if so, respect that value directly.

And then update the image doc to deprecate MONGODB_NOPREALLOC in preference to MONGODB_PREALLOC

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bparees Thanks.

Changed a way how the default is computed. MONGODB_PREALLOC is always preferred. If it is not set, default is get according to MONGODB_NOPREALLOC.

2.6/test/run Outdated
test_config_option MONGODB_QUIET quiet true
test_config_option MONGODB_NOPREALLOC true preallocDataFiles false
test_config_option MONGODB_SMALLFILES true smallFiles true
test_config_option MONGODB_QUIET true quiet true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and then add a test for the new env variable here.

@bparees bparees self-assigned this Mar 15, 2017
@omron93 omron93 force-pushed the config-file-format branch 2 times, most recently from 70ae0ae to 443e045 Compare March 16, 2017 11:10
@omron93
Copy link
Contributor Author

omron93 commented Mar 16, 2017

Please review.

2.6/test/run Outdated
test_config_option MONGODB_NOPREALLOC noprealloc true
test_config_option MONGODB_SMALLFILES smallfiles true
test_config_option MONGODB_PREALLOC preallocDataFiles false
test_config_option MONGODB_SMALLFILES smallFiles true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should keep the test for NOPREALLOC also since it is technically still supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bparees Thanks, testing also MONGODB_NOPREALLOC now.

@bparees
Copy link
Collaborator

bparees commented Mar 16, 2017

lgtm

@omron93
Copy link
Contributor Author

omron93 commented Mar 16, 2017

@bparees While inspecting differences among test scripts, I noticed that 2.6 uses deprecated user management functions. (addUser renamed to createUser and removeUser to dropUser) -> this is really small change (and no functionality is changed), so I've added it to this PR.

@omron93
Copy link
Contributor Author

omron93 commented Mar 16, 2017

[test-openshift]

@omron93
Copy link
Contributor Author

omron93 commented Mar 20, 2017

[test][test-openshift]

Resolves: sclorg#197

Fix tests to test the new config file format.

MongoDB 2.6 does not support modular storage engines.

Have MONGODB_NOPREALLOC only for backward compatibility.

Update tests to also use deprecated MONGODB_NOPREALLOC.

Use user management functions introduced in 2.6 (already used in common.sh scripts)
@omron93
Copy link
Contributor Author

omron93 commented Mar 21, 2017

Squashed. [test-openshift]

@omron93
Copy link
Contributor Author

omron93 commented Mar 21, 2017

Tests are passing. Merging.

@bparees Thanks for review.

@omron93 omron93 merged commit 12a0b41 into sclorg:master Mar 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.2: consider updating default config file to YAML format
2 participants