You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following custom function causes an agent run to fail. Below also is the captured stack trace. From outside puppet, I'm able to use puppetdb-ruby without issue on this host.
require 'puppetdb'
module Puppet::Parser::Functions
newfunction(:test_ruby_puppetdb, :type => :rvalue) do |args|
begin
client = PuppetDB::Client.new({:server=>'http://localhost:8080'})
rescue Exception
puts $!, $@
end
return 1
end
end
uninitialized constant PuppetDB::Client
/etc/puppet/modules/base/lib/puppet/parser/functions/test_ruby_puppetdb.rb:6:in block in <module:Functions>' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/functions.rb:164:inblock (2 levels) in newfunction'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:in profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:inprofile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/functions.rb:157:in block in newfunction' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/function.rb:42:inevaluate'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast.rb:61:in safeevaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/vardef.rb:14:inevaluate'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast.rb:61:in safeevaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/block_expression.rb:11:inblock in evaluate'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/block_expression.rb:10:in each' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/block_expression.rb:10:inevaluate'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast.rb:61:in safeevaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/resource/type.rb:127:inevaluate_code'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/resource.rb:79:in evaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:425:inevaluate_main'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:131:in block (2 levels) in compile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:inprofile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:131:inblock in compile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/context.rb:64:in override' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet.rb:244:inoverride'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:117:in compile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:34:incompile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:95:in block (2 levels) in compile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:inprofile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:93:inblock in compile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util.rb:161:in block in benchmark' /usr/share/ruby/2.0/benchmark.rb:296:inrealtime'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util.rb:160:in benchmark' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:92:incompile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:52:in find' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/indirection.rb:201:infind'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/api/v1.rb:105:in do_find' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/api/v1.rb:50:inblock in call'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/context.rb:64:in override' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet.rb:244:inoverride'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/api/v1.rb:49:in call' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/route.rb:82:inblock in process'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/route.rb:81:in each' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/route.rb:81:inprocess'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/handler.rb:63:in block in process' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:inprofile'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/handler.rb:61:inprocess'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick/rest.rb:37:in block in service' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick/rest.rb:36:insynchronize'
/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick/rest.rb:36:in service' /usr/share/ruby/2.0/webrick/httpserver.rb:138:inservice'
/usr/share/ruby/2.0/webrick/httpserver.rb:94:in run' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick.rb:33:inblock (2 levels) in listen'
/usr/share/ruby/2.0/webrick/server.rb:295:in call' /usr/share/ruby/2.0/webrick/server.rb:295:inblock in start_thread'
The text was updated successfully, but these errors were encountered:
The following custom function causes an agent run to fail. Below also is the captured stack trace. From outside puppet, I'm able to use puppetdb-ruby without issue on this host.
uninitialized constant PuppetDB::Client
/etc/puppet/modules/base/lib/puppet/parser/functions/test_ruby_puppetdb.rb:6:in
block in <module:Functions>' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/functions.rb:164:in
block (2 levels) in newfunction'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:in
profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in
profile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/functions.rb:157:in
block in newfunction' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/function.rb:42:in
evaluate'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast.rb:61:in
safeevaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/vardef.rb:14:in
evaluate'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast.rb:61:in
safeevaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/block_expression.rb:11:in
block in evaluate'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/block_expression.rb:10:in
each' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast/block_expression.rb:10:in
evaluate'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/ast.rb:61:in
safeevaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/resource/type.rb:127:in
evaluate_code'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/resource.rb:79:in
evaluate' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:425:in
evaluate_main'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:131:in
block (2 levels) in compile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:in
profile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in
profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:131:in
block in compile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/context.rb:64:in
override' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet.rb:244:in
override'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:117:in
compile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/parser/compiler.rb:34:in
compile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:95:in
block (2 levels) in compile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:in
profile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in
profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:93:in
block in compile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util.rb:161:in
block in benchmark' /usr/share/ruby/2.0/benchmark.rb:296:in
realtime'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util.rb:160:in
benchmark' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:92:in
compile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/catalog/compiler.rb:52:in
find' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/indirector/indirection.rb:201:in
find'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/api/v1.rb:105:in
do_find' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/api/v1.rb:50:in
block in call'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/context.rb:64:in
override' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet.rb:244:in
override'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/api/v1.rb:49:in
call' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/route.rb:82:in
block in process'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/route.rb:81:in
each' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/route.rb:81:in
process'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/handler.rb:63:in
block in process' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler/around_profiler.rb:58:in
profile'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/util/profiler.rb:51:in
profile' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/handler.rb:61:in
process'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick/rest.rb:37:in
block in service' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick/rest.rb:36:in
synchronize'/usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick/rest.rb:36:in
service' /usr/share/ruby/2.0/webrick/httpserver.rb:138:in
service'/usr/share/ruby/2.0/webrick/httpserver.rb:94:in
run' /usr/local/share/ruby/gems/2.0/gems/puppet-3.7.4/lib/puppet/network/http/webrick.rb:33:in
block (2 levels) in listen'/usr/share/ruby/2.0/webrick/server.rb:295:in
call' /usr/share/ruby/2.0/webrick/server.rb:295:in
block in start_thread'The text was updated successfully, but these errors were encountered: