Could not render to pson: undefined method 'merge' for []:Array

196 views
Skip to first unread message

Micah Martin

unread,
Jul 11, 2012, 4:08:42 PM7/11/12
to puppet...@googlegroups.com
This ones got me absolutely scratching my head. I'm trying to created a custom type for managing couchbase. It may not be the right approach but I'm a total noob and I'm trying to figure this thing out. Here's what I have:

/Puppet/manifests/site.pp

node 'qamachine' {
include webserver
}


/Puppet/modules/webserver/init.pp

class webserver {
couchbase { 'test': }
}

/Puppet/modules/couchbase/lib/puppet/type/couchbase.rb

Puppet::Type.newtype(:couchbase) do
newparam(:name) do
isnamevar
end
end

/Puppet/modules/couchbase/lib/puppet/provider/couchbase/couchbase.rb

Puppet::Type.type(:couchbase).provide(:couchbase) do


end


When I try to update the machine this is what I get:

info: Loading downloaded plugin C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/type/couchbase.rb
info: Loading downloaded plugin C:/ProgramData/PuppetLabs/puppet/var/lib/puppet/provider/couchbase/couchbase.rb
debug: Reloading couchbase couchbase provider
debug: catalog supports formats: b64_zlib_yaml dot pson raw yaml; using pson
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:56:in `deserialize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/rest.rb:120:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/indirector/indirection.rb:196:in `find'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:240:in `retrieve_new_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:490:in `thinmark'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/benchmark.rb:308:in `realtime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:489:in `thinmark'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:239:in `retrieve_new_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:86:in `retrieve_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:112:in `retrieve_and_apply_catalog'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/configurer.rb:152:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:43:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent/locker.rb:21:in `lock'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:43:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.8/sync.rb:230:in `synchronize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:43:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:95:in `with_client'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:41:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `call'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:172:in `controlled_run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/agent.rb:39:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:337:in `onetime'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb:311:in `run_command'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:416:in `hook'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:407:in `exit_on_fail'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:309:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb:69:in `execute'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not render to pson: undefined method `mer
ge' for []:Array

when I remove the call to couchbase in the init.pp file it works fine. 

Jon McKenzie

unread,
Sep 9, 2012, 4:16:53 PM9/9/12
to puppet...@googlegroups.com
I'm having this issue as well, with a nearly identical stack trace (I'm running on RHEL, however).

Anyone have any ideas?

I stuck some debugs inside my provider methods, but they don't ever seem to get executed.

Jon McKenzie

unread,
Sep 9, 2012, 5:16:36 PM9/9/12
to puppet...@googlegroups.com
I restarted my puppetmaster and this seemed to resolve the issue. Very strange message, though. I suppose if I've defined a new type, but haven't restarted puppetmaster it throws a message like this? I will need to test that though
Reply all
Reply to author
Forward
0 new messages