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

Setting handlers to undef for a checks does not trigger change in respective json config file. #414

Closed
mrolli opened this issue Sep 10, 2015 · 3 comments

Comments

@mrolli
Copy link

mrolli commented Sep 10, 2015

After having applied a check to a node with handlers => [ 'handler1', 'handlers2' ] the respective json config file looks fine:

...
  "handlers": [
    "handler1",
    "handler2"
  ],
...

But now I'm not able to remove those handlers again. Leaving out the handlers attribute (therefore using the default undef value) on sensu::check does not have an effect. No change to json config file. How am I supposed to remove the handlers previously set? Delete the json on the node works obviously, puppet has to create a new json file.

@jlambert121
Copy link
Contributor

What version of puppet are you running?

@mrolli
Copy link
Author

mrolli commented Sep 10, 2015

I'm using puppet-3.8.2-1.el6.noarch, which in turn is using ruby-1.8.7 on el6.

One possible workaround I found was setting handlers => [], which leads to an empty array in the json file. I hope the default handler is then triggered as when no handlers are configured within the json file.

@jlambert121
Copy link
Contributor

Puppet pre-4.0 doesn't have a true undefined and thus the providers aren't able to tell that the parameter is unset. I believe this should be fixed with 4.x, but know for sure this issue exists in 3.x.

That workaround (or removing the json file and letting puppet re-add it) are the two solutions I know of for this.

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