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

Fix sensu dashboard config type conversion to always be a string #170

Merged
merged 1 commit into from
Apr 5, 2014

Conversation

solarkennedy
Copy link
Contributor

I believe that when puppet queries the provider for "user" and "password", when they are not there in the json they are "null". This manifests itself on the terminal as an empty string though, so it is not obvious why it doesn't converge:

However, when you ask the parameters to be "" like:

class { 'puppet':
  dashboard_user => '',
  dashboard_password => '',
}
user changed '' to ''
password changed '' to ''

The provider removes the user and password entries in the json as requested, but the catalog never converges because null != '', and never will.

This change fixes this by making the type conversion happen in the provider, allowing the catalog to converge by "faking" the value as an empty string just like we kinda fake the setting of it by removing it out of the json.

I don't know really how to test for this without serverspec stuff and testing for convergence?

@jlambert121
Copy link
Contributor

Until puppet has a true undefined this is likely the best solution. Thanks for this.

jlambert121 added a commit that referenced this pull request Apr 5, 2014
Fix sensu dashboard config type conversion to always be a string
@jlambert121 jlambert121 merged commit 781c211 into sensu:master Apr 5, 2014
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 this pull request may close these issues.

2 participants