-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Refactor mongos handling #509
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
ekohl
commented
Oct 20, 2018
- Remove mongos_ parameters from globals
- Move mongos parameters to mongos::params
- Get the variables in scope so the config renders
- Refactor some coding styles
bastelfreak
reviewed
Oct 20, 2018
manifests/mongos.pp
Outdated
) inherits mongodb::params { | ||
Variant[Boolean, String] $ensure = $mongodb::mongos::params::ensure, | ||
Stdlib::Absolutepath $config = $mongodb::mongos::params::config, | ||
Optional[String] $config_content = undef, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More datatypes \o/
This should work as well?
Suggested change
Optional[String] $config_content = undef, | |
Optional[String[1]] $config_content = undef, |
bastelfreak
reviewed
Oct 20, 2018
bastelfreak
reviewed
Oct 20, 2018
ekohl
force-pushed
the
mongos-refactor
branch
from
October 20, 2018 18:21
d1acfa2
to
cc56307
Compare
Updated:
|
ekohl
force-pushed
the
mongos-refactor
branch
from
October 20, 2018 18:25
cc56307
to
85ee1aa
Compare
bastelfreak
reviewed
Oct 20, 2018
manifests/mongos.pp
Outdated
Stdlib::Absolutepath $config = $mongodb::mongos::params::config, | ||
Optional[String[1]] $config_content = $mongodb::mongos::params::config_content, | ||
Optional[String[1]] $config_template = $mongodb::mongos::params::config_template, | ||
Variant[String, Array[String]] $configdb = $mongodb::mongos::params::configdb, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you use this here?
Suggested change
Variant[String, Array[String]] $configdb = $mongodb::mongos::params::configdb, | |
Variant[String[1], Array[String[1]]] $configdb = $mongodb::mongos::params::configdb, |
bastelfreak
approved these changes
Oct 20, 2018
ekohl
force-pushed
the
mongos-refactor
branch
from
October 20, 2018 18:59
85ee1aa
to
2524a56
Compare
Updated:
|
This now allows you to purge the package using $package_ensure. We can assume $service_ensure only has either running or stopped as value because of data types. We can use this to simplify our code. hasstatus has been defaulting to true since 2.7.0. Rename bind_ip_real to connect_ip to better state what it's used for.
ekohl
force-pushed
the
mongos-refactor
branch
from
October 20, 2018 19:01
2524a56
to
4fad38c
Compare
bastelfreak
approved these changes
Oct 20, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.