-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
service definition file will be changed frequently #45
Comments
That's kinda strange, we do hash sort on purpose so this Doesn't happen. What is your puppet master situation, do you just have one, or multiple? And are they running the same version of ruby and everything? |
Only one puppet master :-( Version 3.6.2 |
@solarkennedy Looks like the code is only sorting the first level in the hash? |
Maybe we could do something like this? |
I would be willing to beta-test this. I'm out of office until monday, so it might be delayed until then :-) Could you provide me with a patch, or do you want me to try implementing it on my own? |
Its ok to be delayed. We've been ok this far. |
+1 for this issue. I'm still running Puppet 2.7 and Ruby 1.8.7 so Hash order is no longer guaranteed. This means consul gets restarted unnecessarily quite often. I've got a working solution to this problem which is to exec a |
Another alternative to the above gist is a custom function, see https://gist.github.com/falzm/8575549 |
If this can be done in erb, I would prefer it over the custom function. |
On a Puppet 3.7.2 and ruby 1.8.7 stack this is standard behaviour thus this is not idempodent :( And causes frequent restarts hence instabilities in the stack . Another approach could be https://gist.github.com/halkeye/2287885 |
Ah! That is the one! I totally have used that one before. Please PR me or I'll do it myself eventually. |
@solarkennedy I just checked - their does not seem to be a license associated with it. Is that a problem for you? |
@hco I've noted that you have asked on For now just take it an we'll do something different if it is not compatible. |
I am seeing the exact same problem with the generated /etc/consul/config.json, and it's causing unnecessary service restarts. Willing guinea pig for patches here as well. |
I've pushed a change to master that includes the recursive sorted json function to create the service file. Try now. |
Hi,
for some reason my service defintion files will be changed every few runs, even though nothing changes.
The following file sometimes looks like this:
and sometimes like this:
This will result in consul restarting every few runs :-(
The text was updated successfully, but these errors were encountered: