On Tuesday, July 24, 2012 10:33:11 AM UTC-5, David Campos wrote: > > Hello all, > > I do not know whether I have hit a bug or it is just a misconception about > puppet configuration but I have found a strange inconsistency setting > custom providers and types. Theoretically, custom providers and types can > be located at a folder named <module_name>/lib/puppet/providers or > <module_name>/lib/puppet/types > and they should be sent to agents when using the puppet master - agent > approach (if pluginsync is allowed). > > The problem comes when I tried to set this up with the glassfish module. I > found that leaving the library at lib folder was not enough and I was > getting the following exceptions: > > err: Could not autoload domain: Could not autoload >> /etc/puppet/modules/glassfish/lib/puppet/provider/domain/asadmin.rb: no >> such file to load -- puppet/provider/asadmin at >> /etc/puppet/modules/glassfish/manifests/config.pp:32 on node norway-vm4663 >> /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:27:in `compile' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in >> `compile' >> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:159:in `benchmark' >> /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' >> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:158:in `benchmark' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in >> `compile' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:35:in >> `find' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:196:in `find' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:109:in >> `do_find' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:68:in `send' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:68:in `process' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in >> `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:45:in `listen' >> /usr/lib/ruby/1.8/webrick/server.rb:173:in `call' >> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' >> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:41:in >> `initialize' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `new' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:38:in >> `synchronize' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:38:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:126:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:141:in `start' >> /usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:124:in `start' >> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:202:in `main' >> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:144:in >> `run_command' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' >> /usr/bin/puppet:4 >> err: /usr/lib/ruby/site_ruby/1.8/puppet/parser/compiler.rb:27:in `compile' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:77:in >> `compile' >> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:159:in `benchmark' >> /usr/lib/ruby/1.8/benchmark.rb:308:in `realtime' >> /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:158:in `benchmark' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:75:in >> `compile' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/compiler.rb:35:in >> `find' >> /usr/lib/ruby/site_ruby/1.8/puppet/indirector/indirection.rb:196:in `find' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:109:in >> `do_find' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:68:in `send' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/handler.rb:68:in `process' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick/rest.rb:24:in >> `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' >> /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:45:in `listen' >> /usr/lib/ruby/1.8/webrick/server.rb:173:in `call' >> /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' >> /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' >> /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' >> /usr/lib/ruby/1.8/webrick/server.rb:82:in `start' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:42:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:41:in >> `initialize' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `new' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:41:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:38:in >> `synchronize' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:38:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:126:in `listen' >> /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:141:in `start' >> /usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:124:in `start' >> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:202:in `main' >> /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:144:in >> `run_command' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:416:in `hook' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:407:in `exit_on_fail' >> /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:309:in `run' >> /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:69:in `execute' >> /usr/bin/puppet:4 >> err: Could not autoload domain: Could not autoload >> /etc/puppet/modules/glassfish/lib/puppet/provider/domain/asadmin.rb: no >> such file to load -- puppet/provider/asadmin at >> /etc/puppet/modules/glassfish/manifests/config.pp:32 on node norway-vm4663 > > > Searching a bit through google, someone pointed that sometimes puppet was > searching libraries at libdir so I moved it there, and the exception was > gone! But the code was not being executed and only traces were written on > the master. But I didn't want it to be executed on the master! Or was it > not being really executed? (nothing different was happening on the master). > > At the end, I have placed the library either at <module_dir>/lib folder > and at libdir but I do not like this approach. What's happening? Thanks! > > Puppet 2.7.14 > >
I'm using Puppet 3.0.0rfc3, so your YMMV, but for me it's <module_name>/lib/puppet/provider/<typename> and <module_name>/lib/puppet/type Note both "type" and "provider" are both singular - there's no trailing 's'. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/YndYA6hTnEkJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.