-
-
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
Fix for Issue 447 #450
Fix for Issue 447 #450
Conversation
Updating fork
The crm provider for cs_location did never set that. A version check ensures that parameter is only set when running pacemakerd >= 1.1.13 Fixes voxpupuli#447
Hi @timdeluxe. thanks for the patch. Can you take a look at the failing travis tests? |
@bastelfreak I have no clue yet about the other failures, only about the 2nd one: It expects the resource discovery parameter on RedHat systems (obviously because those use the pcs provider) and do not expect it on non RedHat systems (because those usually use the crm provider). puppet-corosync/spec/acceptance/cs_location_spec.rb Lines 109 to 115 in 90169bb
However that resource-discovery feature is not bound to the provider (crm or pcs), but more to the pacemaker version, where my fix is for. That said i am still unsure how to rewrite the acceptance test. Either the pacemakerd version is also gathered in the acceptance test similar to the patch i provided or we find out which OS families and versions provide pacemakerd >= 1.1.13. What do you think? |
Corrected it. Still fixes voxpupuli#447
@timdeluxe I don't have a preference here. A fact would probably be nice, as it could be used in other places as well. |
(my fault). Adding rescue to prevent issues when command is not yet found on fresh systems, where pacemaker is not yet installed. Still fixes voxpupuli#447
Okay, i will try to do that in the next days, sorry for the constantly failing builds so far... :-/ |
Updating own fork
and acceptance tests according to it. Still trying to fix voxpupuli#447
Still trying to fix voxpupuli#447
Still trying to fix voxpupuli#447
@bastelfreak Sorry for doing nothing for so long. As you can see i introduced a fact for the pacemaker version, but now there is a racing condition in the beaker tests. The facts are gathered at the beginning and since no pacemaker is installed there yet, no pacemakerd_version is given. This leads to a failing test for the resource-discovery stuff. Maybe the tests may be fixable, but i think this could also raise a problem in the real world, because the resource-discovery feature would require two puppet runs to successfully get applied (first run: pacemakerd_version fact empty because no pacemaker is installed yet -> location would be created without resource-discovery parameter; second run: pacemakerd_version now filled and location gets resource-discovery parameter added, if pacemakerd_version is >= 1.1.13). However i don't know how to fix the acceptance tests then. As said previously redhat vs. non-redhat is definitly wrong. Would it be feasible to check the OS and the major version there and see, which one has pacemaker version >= 1.1.13 and which < 1.1.13, rather than trying to check the version itself directly? Would that be a valid way to do it? |
Dear @timdeluxe, thanks for the PR! This is Vox Pupuli Tasks, your friendly Vox Pupuli Github Bot. I noticed that your pull request has CI failures. Can you please have a look at the failing CI jobs? |
@bastelfreak Can you help @timdeluxe here? We're still running on this branch and would like to use the official 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.
my suggested change isn't great, but it's better than being stuck with this pr staying open forever
…m provider. Updating acceptance tests to work correctly with resource-discovery. Still trying to fix voxpupuli#447
Yes, failing tests i know. Sorry. :-/ |
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.
🙋🏻♀️
…uest hints. Fixing setting of discovery parameter. Still trying to fix voxpupuli#447
…OS as proposed in voxpupuli#455 to fix beaker tests
Finally 😌 I hope the PR can be merged now, if not please highlight what is missing. Thanks! |
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 👀
…rder score parameter.
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.
👍
# we need to check if we run at least pacemakerd version 1.1.13 before enabling feature discovery | ||
# see http://blog.clusterlabs.org/blog/2014/feature-spotlight-controllable-resource-discovery | ||
begin | ||
pacemakerd_version_string = pacemakerd('--version') |
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.
Is this executed on the agent or during catalog compilation?
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.
It is executed on the agent.
(We are already using this code in our environment. If it would be executed during compilation it would be done on the puppetserver, where there is no pacemakerd installed and we then wouldn't have the discovery feature, which we have.)
an we merge this? |
@igalic looks good to me, but I am far from being an expert for this. |
@igalic @bastelfreak @ekohl Is anything holding back from merging this? If not, please do so. If yes, please tell me, so i can work on it. |
let's see what happens if we do merge it |
Pull Request (PR) description
Fixes the issue (#447), that resource_discovery parameter on cs_location is never set, when using provider crm. The provider did not set the feature "discovery" and also had no method for it. Just simply setting the feature would not be good, since it is first available since pacemaker 1.1.13, so i included a version check.
This Pull Request (PR) fixes the following issues
Fixes #447