-
Notifications
You must be signed in to change notification settings - Fork 290
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
sensu custom json reordered on each run #271
Comments
|
I narrowed this down to the occurrences parameter. If that's removed, there's no longer any problem with the custom reordering. |
|
@jaxxstorm thanks for the update - greatly appreciated. I hope to get a larger chunk of time to dive into this in the next few days. |
|
If it's any help, I'm also getting the same behaviour when using the handlers and keepalive config options in the client config options as well. The sporadic behaviour of this is becoming a real pain. I can't implement a new feature without potentially breaking my entire setup |
|
Sorry, didn't mean to close |
|
So far I have been able to find the following things affected: keepalive => handler I believe there's more, but that's what I have confirmed so far |
|
@jaxxstorm So I started to look at this and got very confused - occurences isn't a custom flag. Try this: sensu::check { $name:
ensure => $ensure,
handlers => $handlers,
command => $command,
standalone => true,
interval => $interval,
occurrences => $occurrences,
custom => merge({
event_description => $event_description,
notification_email => $notification_email,
create_ticket => $create_ticket,
send_email => $send_email,
pagerduty_key => $pagerduty_key,
}, $sensu_custom)
}That totally fixed the check issue for me. Can you show me sample code with the keepalive handlers please? |
|
So as discussed in IRC, I think these might be different problems now I've narrowed them down, thanks for spotting my mistake @jamtur01 My original code looked like this: I then changed the handler param to use handlers, which requires a hash And this happens: If I diff the files: and the raw file looks like What I also noticed is that I revert back to the original, it doesn't remove the handlers hash, so you end up with this raw file: Which is obviously also a problem. NOW, what's interesting here is that if I remove the file completely: then rerun puppet, the file gets ordered correctly when it's created, and there's no subsequent changes on rerun. |
|
What version of the module are you using? |
|
I was a few commits behind, but I've just done a git pull and I'm up to date. Problem persists |
|
@jaxxstorm The problem is that it shouldn't persist and I can't replicate it. Ping @johnf - any thoughts? |
|
@jaxxstorm is this still an issue? |
I can't figure out WHY this is happening.
Puppet 3.6.2
Ruby 1.8.7
When I define a check like this:
and the define this check with the wrapped define:
It results in the json being reordered for each run. Note, this almost the same check as #265 so it's probably the custom definitions, but it doesn't seem to happen for all checks, so I can't narrow down exactly what is causing it.
Here's the diff
This has completely crippled our sensu install for the time being, so any help would be appreciated.
The text was updated successfully, but these errors were encountered: