Skip to content
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

handler hash ordering causing unneeded changes #133

Closed
ghost opened this issue Jan 10, 2014 · 4 comments
Closed

handler hash ordering causing unneeded changes #133

ghost opened this issue Jan 10, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Jan 10, 2014

Notice: /Stage[main]/role_sensu::Server/Sensu::Handler[relay]/Sensu_handler[relay]/socket: socket changed {'port' => '2003', 'socket' => 'carbon.hostedgraphite.com'} to '{"socket"=>"carbon.hostedgraphite.com", "port"=>2003}'

I believe this is caused by the handler type taking a hash for the socket attribute. Due to the non-deterministic ordering of the hash retrieval you see frequent 'changes' where no actual change occurs. This causes the puppet enterprise dashboard to permanently list the node as recently changed.

This should be fixable by sorting the socket hash before using it within the json.

@jlambert121
Copy link
Contributor

@robertpearce are you able to send a PR for this fix? If not, I'll add it to my TODO list.

@ghost
Copy link
Author

ghost commented Jan 13, 2014

don't know ruby, sorry :( i tried a .sort() in a several places but didn't get it right enough to work how i expected.

@danshultz
Copy link
Contributor

@jlambert121 @robertpearce - I have also addressed this issue with my fix in issue #160

@jlambert121
Copy link
Contributor

closed via #160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants