-
-
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
cs_colocation sets don't work properly #449
Comments
Hi @langesven Between first and subsequent runs, you change the definition of
Because the definition changed in the catalog, puppet applies the change. There is a difference with previous catalog. That's an expected behavior. The error message |
Hi @actatux well, my point is though, I'm not changing the definition between runs - puppet interprets the resource it creates based on my definition as a different definition. My code in the .pp is and stays
which makes puppet create the resource in the first run.
as evident in the puppetrun output and by running So the module is using one code snippet to create the resource, but when it reads back the resource it created it doesn't end up the same code snippet, possibly due to a parsing bug. And because the module reads back the resource with a different definition it tries to delete and re-create it, because it thinks something changed. Which yes, given your linked pcs fix would not create an error. But in my opinion the fact that puppet thinks the resource changed (even though it didn't) because it parses the resource to different puppetcode than the code that created it is a bug. I did try to create the resource with the definition that puppet spits out (thinking the code I use might just randomly create the correct resource, but in reality the puppetcode is correct about the definition and I'm just lucky that my code worked), but that errors completely with the |
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#449
Please ignore my commit to this issue, used the wrong commit message :-( |
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
First set of errors:
Second set of errors, using the output of
puppet resource
:What are you seeing
First puppetrun, with no previous colocations set:
Asking puppet to define this resource:
Subsequent puppetruns produce:
which errors with:
When trying to use the output of
puppet resource
instead of the double array:What behaviour did you expect instead
I expected the first bit of code to work and not produce errors on subsequent puppetruns because nothing changed. But it thinks stuff changed and thus tries to delete the constraint and re-create it the same way it was before and as such pacemaker throws an error.
Output log
see above
Any additional information you'd like to impart
It would appear that parsing of stuff in the XML config via the provider produces a resource that the type can't work with.
Parsing happens in
def self.instances
ofprovider/cs_colocation/pcs.rb
while the primitive parsing of the resource happens indef extract_primitives
oftype/cs_colocation.rb
Relevant output of the XML config of the proper colocation resource
The text was updated successfully, but these errors were encountered: