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

Pull request #407 breaks the show for me. #412

Closed
mrolli opened this issue Sep 7, 2015 · 4 comments
Closed

Pull request #407 breaks the show for me. #412

mrolli opened this issue Sep 7, 2015 · 4 comments

Comments

@mrolli
Copy link

mrolli commented Sep 7, 2015

I just updated my master to current HEAD and the module is now broken for me. Pull request #407 breaks my stuff with the following error message:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter db on Sensu_redis_config[myserver.example.com] at /etc/puppet/environments/development/modules/sensu/manifests/redis/config.pp:34 on node myserver.example.com

Doing a git checkout d1819aa2d8e817(the commit right before the offending commit), the catalog compilation works again as expected.

Any ideas?

@mrolli
Copy link
Author

mrolli commented Sep 8, 2015

Just to make sure... pluginsync works fine. The changes get spread:

Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet/type/sensu_redis_config.rb]/content:
--- /var/lib/puppet/lib/puppet/type/sensu_redis_config.rb       2015-09-07 12:53:15.163426135 +0000
+++ /tmp/puppet-file20150908-1771-ce3tku-0      2015-09-08 12:55:51.147018676 +0000
@@ -56,6 +56,18 @@
     defaultto :false
   end

+  newproperty(:db) do
+    desc "The Redis instance DB to use/select"
+
+    defaultto '0'
+  end
+
+  newproperty(:auto_reconnect) do
+    desc "Reconnect to Redis in the event of a connection failure"
+
+    defaultto :true
+  end
+
   autorequire(:package) do
     ['sensu']
   end

Notice: /File[/var/lib/puppet/lib/puppet/type/sensu_redis_config.rb]/content: content changed '{md5}fe4ce6a8ce13b092ef0dc925fe67efb1' to '{md5}25a05aa3a4a007ad17bcdd86b4263576'
Notice: /File[/var/lib/puppet/lib/puppet/provider/sensu_redis_config/json.rb]/content:
--- /var/lib/puppet/lib/puppet/provider/sensu_redis_config/json.rb      2015-09-07 12:53:26.033501535 +0000
+++ /tmp/puppet-file20150908-1771-1gk1zsk-0     2015-09-08 12:55:51.706007285 +0000
@@ -68,4 +68,20 @@
   def reconnect_on_error=(value)
     conf['redis']['reconnect_on_error'] = value
   end
+
+  def db
+    conf['redis']['db'].to_i
+  end
+
+  def db=(value)
+    conf['redis']['db'] = value.to_i
+  end
+
+  def auto_reconnect
+    conf['redis']['auto_reconnect']
+  end
+
+  def auto_reconnect=(value)
+    conf['redis']['auto_reconnect'] = value
+  end
 end

Notice: /File[/var/lib/puppet/lib/puppet/provider/sensu_redis_config/json.rb]/content: content changed '{md5}7ff0b496dee89f5baac1938a028132a6' to '{md5}4972d2d8d62b9ec206885e0077e9affe'
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter db on Sensu_redis_config[test.example.com] at /etc/puppet/environments/development/modules/sensu/manifests/redis/config.pp:34 on node test.example.com
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

@bovy89
Copy link
Contributor

bovy89 commented Sep 8, 2015

Hi, can you post your manifest? It seems that you are using "db" instead of redis_db

# [*redis_db*]
#   Integer.  The Redis instance DB to use/select
#   Default: 0

@mrolli
Copy link
Author

mrolli commented Sep 8, 2015

I'm using the following puppet code:

class { '::sensu':
  plugins_dir => 'puppet:///modules/site/sensu/plugins',
}

The rest comes from hiera by relying on data bindings. Neither sensu::db nor sensu::redis_db are set within hieradata.

@mrolli
Copy link
Author

mrolli commented Sep 9, 2015

Hm, now I'm puzzled. Yesterday I had at least 10 failed runs on every node. Switching to revision d18199aa - the stuff worked. Switching back to HEAD - the stuff didn't work. Restarted puppetmaster, puppet agents... nothing helped. Then I left the stuff for 10h and this morning - first puppet agent run - worked and every thereafter. Nothing has changed though since yesterday (hierdata, manifest, ... No idea where this strange behaviour was coming from.

Well, sorry for the bells and whistles.

@mrolli mrolli closed this as completed Sep 9, 2015
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