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

Idempotence problems with sensu_dashboard_config #162

Closed
jcmcken opened this issue Feb 21, 2014 · 3 comments
Closed

Idempotence problems with sensu_dashboard_config #162

jcmcken opened this issue Feb 21, 2014 · 3 comments

Comments

@jcmcken
Copy link

jcmcken commented Feb 21, 2014

When the dashboard user and password are set to '' (empty string), the sensu_dashboard_config resource displays the following:

Notice: /Stage[main]/Sensu::Dashboard::Config/Sensu_dashboard_config[sanitized.fqdn]/user: user changed '' to ''

I'm setting these to blank because I want to proxy to the dashboard using Apache and our internal SSO.

@jcmcken
Copy link
Author

jcmcken commented Feb 21, 2014

There doesn't seem to be a great way to fix this, since Puppet doesn't have a nil. Either you remove the default user/password and make them empty, or maybe use a patch like this to lib/puppet/provider/sensu_dashboard_config/json.rb:

@@ -51,7 +51,7 @@
   end

   def user
-    conf['dashboard']['user']
+    conf['dashboard']['user'] or ''
   end

   def user=(value)
@@ -60,7 +60,7 @@
   end

   def password
-    conf['dashboard']['password']
+    conf['dashboard']['password'] or ''
   end

   def password=(value)

What do you think?

@jlambert121
Copy link
Contributor

Yeah, the nil/false/undef problem is a real issue with these providers. I've talked to a few PL people without much success other than "hopefully with 4.0". If you have some ideas though I'd love to see a PR that resolves it - it's a problem for all of the providers.

@jlambert121
Copy link
Contributor

Closed via #170

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