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

Source parameter not purged when removed from check #601

Closed
jaxxstorm opened this issue Jan 12, 2017 · 1 comment · Fixed by #602
Closed

Source parameter not purged when removed from check #601

jaxxstorm opened this issue Jan 12, 2017 · 1 comment · Fixed by #602

Comments

@jaxxstorm
Copy link
Contributor

Description of problem

When adding the source parameter to a check, then removing it later, the source parameter hangs around in the JSON
I expected when refreshing the JSON on the check after removing the source parameter, the source parameter remained. In order to fix this, I had to remove the check entirely

To reproduce, simply define a check:

sensu::check { 'test':
  command => '/bin/true'
  source => 'something'
}

Then update it to remove the source parameter:

sensu::check { 'test':
  command => '/bin/true'
}

Platform and version information

  • Your OS: Linux
  • Your Ruby version: 2.1.1
  • Your version of Puppet: 3.8.7
  • Your version of Sensu: 0.25.2
@ttarczynski
Copy link
Contributor

In #602 I'm adding a possibility to purge properties with 'absent':

sensu::check { 'test':
  command => '/bin/true',
  source => 'absent'
}

If you need to purge properties by default, we can change the default values in manifests/check.pp from undef to 'absent'. Then a property removed from sensu::check declaration would be also removed from JSON file.

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

Successfully merging a pull request may close this issue.

2 participants