-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Allow multiple rings in nodelist #291
Conversation
or ( is_array($unicast_addresses) and is_array($unicast_addresses[0]) and size($unicast_addresses[0]) > 1 ) | ||
or ( is_array($quorum_members) and is_array($quorum_members[0]) and size($quorum_members[0]) > 1 ) | ||
and $rrp_mode == 'none' { | ||
fail('You must set rrp_mode to active or passive with multiple rings') |
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.
Do you really think that the validation belongs to the Puppet module?
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.
IMO this is correct. the logic is a bit complex but we should keep it.
Hello, Thanks for your pull requests. Could you please add tests to prevent future regressions? |
Why are you closing this? |
Spent 30mins trying to get spec going and started feeling frustrated, so
|
ok |
@@ -96,7 +96,9 @@ quorum { | |||
nodelist { | |||
<% [@quorum_members].flatten.each_index do |i| -%> |
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.
This is broken, will commit <% Array(@quorum_members).each_index do |i| -%>
The failures from "travis-ci" are about not finding a proper version of puppet-lint... what am I supposed to do about it? Can I still tick the box "Ran the unit/spec tests and ensured they still pass"? |
yeah we broke that yesterday evening - sorry about that :( I will try to fix that tomorrow |
or ( is_array($unicast_addresses) and is_array($unicast_addresses[0]) and size($unicast_addresses[0]) > 1 ) | ||
or ( is_array($quorum_members) and is_array($quorum_members[0]) and size($quorum_members[0]) > 1 ) ) | ||
and $rrp_mode == 'none' { | ||
fail('You must set rrp_mode to active or passive with multiple rings') |
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.
Please drop this, I think it is best to use:
file {
'corosync.conf':
validate_cmd => 'corosync -t'
}
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.
Would using validate_cmd from puppetlabs-stdlib be okay?
validate_cmd(template($corosync_conf), 'corosync -t', 'Corosync failed to validate /etc/corosync/corosync.conf')
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.
no, we should use standard file { validate_cmd
}
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.
The approcach in #294 is better than this ?
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.
Much better, yes.
Validate_cmd is only in puppet 3.5+, would be nice to fallback to stdlib for previous versions.
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.
Then we will wait for the 4.0 version of this module before releasing #294. At that time we will remove support for Puppet < 3.6. I do not think that it is useful to get a workaround until then.
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.
#294 is merged, you can remove that block :)
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.
I still need this as our company is not ready to upgrade puppet to 3.6+...
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.
master
is no longer compatible with Puppet < 3.6.
needs tests |
rebased |
I don't like the [...].flatten everywhere. I believe using Array() is the way to ensure you get an Array where you expect one. http://docs.ruby-lang.org/en/2.0.0/Kernel.html#method-i-Array |
You still miss tests. With tests you do not believe, you know :) |
unfortunately not going to happen anytime soon... the desire and/or will to learn spec is not on my todo list... maybe just close this PR? |
Regarding [].flatten, it returned unexpected results for me with array of arrays where Array() did correct thing... would be nice to prove the world using spec tests but see previous comment. |
You can PR this to the oldpuppet branch, this branch should work with old puppet versions, then we can release a v3.0.1 and backport the changes to 4.0.1 |
Let's keep this PR open and I'll see if I find some time to work on that. |
This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or In jurisdictions that recognize copyright laws, the author or authors THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, For more information, please refer to http://unlicense.org |
Merci RoiDeLapluie 👍 |
Closes voxpupuli#291 Signed-off-by: Julien Pivotto <[email protected]>
Closes voxpupuli#291 Signed-off-by: Julien Pivotto <[email protected]>
Closes voxpupuli#291 Signed-off-by: Julien Pivotto <[email protected]>
Please check the following items before submitting a PR -- thank you!
Note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.
Contributor Code of Conduct.
closed once this PR gets merged, i.e:
Closes #1554
in the body of a committries to address multiple issues. Though we prefer one PR per feature/fix,
sometimes that's not feasible. In that case ensure that a single feature/fix
and associated tests and documentation is bundled up in one commit
Optional, but extra points:
reintroduced