petems / petems-hiera_vault

A hiera backend for access to secrets being stored in HashiCorp Vault
Apache License 2.0
44 stars 45 forks source link

Caching vault object causes heisenbug on heavy-loaded puppetserver #61

Open tiandrey opened 3 years ago

tiandrey commented 3 years ago

I have a heavy-loaded puppetserver (about 2k nodes with default 30m checkin interval; 32 workers) with lots of environments (20-30). Relatively frequently I receive different errors caused by $vault being shut down or nil'ed. I guess this one occurs when $vault.shutdown happens at the same time as lookup is made for another node:

[hiera-vault] Skipping backend. Configuration error: Vault::ConnectionPool::PoolShuttingDownError

And this one, I guess, happens when $vault = nil during another lookup:

[hiera-vault] Skipping backend. Configuration error: undefined method 'request' for nil:NilClass
[hiera-vault] Skipping backend. Configuration error: undefined method `configure' for nil:NilClass

To be honest, for this one I'm not sure what causes it, but maybe it has something to do with simultaneous shutdown:

[hiera-vault] Skipping backend. Configuration error: no cipher match

For now I solved this problem by removing global vault caching object and changing it back to local variable; adding vault.shutdown instead of $shutdown.call seems to solve problem of CLOSE_WAIT sockets (although right now I see one such socket on my server). Is there any better way to do this? Maybe fence these operations with mutex or something similar?

tiandrey commented 3 years ago

Update: with puppetserver version 6.2.0-1stretch, there were only Vault::ConnectionPool::PoolShuttingDownError errors (about 100 errors per day) However, with puppetserver version 6.15.1-1stretch (I tested both old single-threaded and new multithreaded JRuby mode), there are many different errors, here are stats for one day:

root@puppet:~# zcat /var/log/puppetlabs/puppetserver/puppetserver-2021-03-25.0.log.gz /var/log/puppetlabs/puppetserver/puppetserver-2021-03-25.1.log.gz | grep 'Skipping backend' | grep -o '\[hiera-vault\].*' | awk -F ' on node' '{print $1}' | awk -F ' \\(file:' '{print $1}' | sort | uniq -c | sort -n
      3 [hiera-vault] Skipping backend. Configuration error: Socket closed
      3 [hiera-vault] Skipping backend. Configuration error: undefined method `request' for nil:NilClass
      3 [hiera-vault] Skipping backend. Configuration error: undefined method `ssl_version=' for nil:NilClass
     12 [hiera-vault] Skipping backend. Configuration error: The Vault server at `https://127.0.0.1:8200' is not currently
     81 [hiera-vault] Skipping backend. Configuration error: Vault::ConnectionPool::PoolShuttingDownError
   2700 [hiera-vault] Skipping backend. Configuration error: undefined method `configure' for nil:NilClass
   3087 [hiera-vault] Skipping backend. Configuration error: no cipher match

Some of no cipher match errors may be accounted for changes in default ciphers in puppetserver, but surely not all of them. Also, https://127.0.0.1:8200 is NOT address of my Vault server.

petems commented 3 years ago

@tiandrey Can you change your module to use this branch fix to see if it resolves your problem: https://github.com/petems/petems-hiera_vault/pull/65

petems commented 3 years ago

I've just cut and pushed a release for 2.0.0, hopefully this should fix it 👍🏻

tiandrey commented 3 years ago

Can't check it right now, but mutex should fix the problem. I'll comment as soon as I'm able to test it.

tiandrey commented 3 years ago

I've tried v2.0.0 - received lots of errors like

2021-08-16T19:26:57.548+03:00 ERROR [qtp1752447289-227] [puppetserver] Puppet [hiera-vault] Skipping backend. Configuration error: no cipher match
2021-08-16T19:26:57.548+03:00 ERROR [qtp1752447289-227] [puppetserver] Puppet [hiera-vault] Skipping backend. Configuration error: no cipher match on node example-hostname
2021-08-16T19:26:57.549+03:00 ERROR [qtp1752447289-227] [puppetserver] Puppet Server Error: [hiera-vault] Skipping backend. Configuration error: no cipher match on node example-hostname
/etc/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:138:in `block in vault_get'
org/jruby/ext/thread/Mutex.java:164:in `synchronize'
/etc/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:112:in `vault_get'
/etc/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:89:in `lookup_key'
petems commented 3 years ago

What version of Vault and Puppet are you running?

Looks like this: https://github.com/hashicorp/vault-ruby/issues/179

tiandrey commented 3 years ago
vault (0.16.0)
ii  puppet-agent                  6.23.0-1stretch                     amd64        The Puppet Agent package contains all of the elements needed to run puppet, including ruby, facter, and hiera.
ii  puppetserver                  6.15.3-1stretch                     all          Puppet Labs puppetserver

This is still a heisenbug, most of requests are completed successfully, but many still have this error.

petems commented 3 years ago

Which version of Vault itself do you have installed? (The app itself, not the gem)

petems commented 3 years ago

Are you using the same Puppet version across your estate?

petems commented 3 years ago

Also, could you do puppetserver gem list for me?

tiandrey commented 3 years ago

Which version of Vault itself do you have installed?

Don't know, don't think it matters - most requests succeed, so the problem it's not caused by cryptography issues per se.

Are you using the same Puppet version across your estate?

From 6 to 7. Again, it doesn't matter - the same node can have error on one run and success on the next.

Gems

# puppetserver gem list
2021-08-16 21:09:46,583 INFO  [p.s.j.jruby-puppet-core] Disabling i18n for puppet because using multithreaded jruby

*** LOCAL GEMS ***

aws-eventstream (1.1.1)
aws-sigv4 (1.2.3)
cmath (default: 1.0.0)
concurrent-ruby (1.1.5)
csv (default: 1.0.0)
debouncer (0.2.2)
deep_merge (1.0.1)
fast_gettext (1.1.2)
fileutils (default: 1.1.0)
gettext (3.2.2)
hiera-eyaml (3.2.1)
highline (2.0.3)
hocon (1.3.1)
ipaddr (default: 1.2.0)
jar-dependencies (default: 0.4.0)
jruby-openssl (default: 0.10.5 java)
jruby-readline (default: 1.3.7 java)
json (default: 2.2.0 java)
locale (2.1.3, 2.1.2)
multi_json (1.14.1)
optimist (3.0.1)
psych (default: 3.2.0 java)
puppet-resource_api (1.8.14)
puppetserver-ca (1.9.4)
rake-ant (default: 1.0.4)
rdoc (default: 6.1.2)
scanf (default: 1.0.0)
semantic_puppet (1.0.4, 1.0.2)
text (1.3.1)
vault (0.15.0)
webrick (default: 1.6.1)

and bonus

# /opt/puppetlabs/puppet/bin/gem list

*** LOCAL GEMS ***

aws-eventstream (1.1.1)
aws-sigv4 (1.2.3)
bigdecimal (default: 1.3.4)
cmath (default: 1.0.0)
colored2 (3.1.2)
concurrent-ruby (1.1.8)
cri (2.15.11)
csv (default: 1.0.0)
date (default: 1.0.0)
debouncer (0.2.2)
deep_merge (1.0.1)
did_you_mean (1.2.0)
etc (default: 1.0.0)
facter (3.14.18)
facter-ng (4.2.1)
faraday (0.17.4)
faraday_middleware (0.14.0)
fast_gettext (1.1.2)
fcntl (default: 1.0.0)
ffi (1.13.1)
fiddle (default: 1.0.0)
fileutils (default: 1.0.2)
gettext (3.2.2)
gettext-setup (0.34)
hiera (3.7.0)
hiera-eyaml (3.2.1)
highline (2.0.3)
hocon (1.3.1)
httpclient (2.8.3)
io-console (default: 0.4.6)
ipaddr (default: 1.2.0)
json (default: 2.1.0)
locale (2.1.3)
log4r (1.1.10)
minitar (0.9)
minitest (5.10.3)
multi_json (1.14.1)
multipart-post (2.1.1)
net-ssh (4.2.0)
net-telnet (0.1.1)
openssl (default: 2.1.2)
optimist (3.0.1)
power_assert (1.1.1)
psych (default: 3.0.2)
puppet (6.23.0)
puppet-resource_api (1.8.14)
puppet_forge (2.3.4)
puppetserver-ca (1.9.4)
r10k (3.8.0)
rake (12.3.3)
rdoc (default: 6.0.1.1)
scanf (default: 1.0.0)
sdbm (default: 1.0.0)
semantic_puppet (1.0.4)
stringio (default: 0.0.1)
strscan (default: 1.0.0)
sys-filesystem (1.3.2)
test-unit (3.2.7)
text (1.3.1)
thor (1.1.0)
thread (0.2.2)
vault (0.16.0)
webrick (default: 1.4.2.1)
xmlrpc (0.3.0)
zlib (default: 1.0.0)
petems commented 2 years ago

I was interested in the Vault version because there might be a specific change they've made on their side I'm not aware of (as right now the repo only tests against 1.0,1.1,1.2 and 1.3...

I'm seeing if I can setup a test environment with different versions of Vault and different JRuby versions to see what cipher issues there are

We've just merged a new feature that adds caching so that might help with some of the load issues, can you test that out?

hfrog commented 6 months ago

Hello, I had the same problem Configuration error: no cipher match, and it looks like the new feature fixed the issue. Can you please add a new tag?

hfrog commented 6 months ago

A few days later we've encountered it again.

Click to view backtrace ``` 2024-02-26T10:46:33.594+03:00 ERROR [qtp158214520-3464617] [puppetserver] Puppet Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, no cipher match (file: /var/lib/puppetlabs/code/environments/production/site/profile/manifests/nginx.pp, line: 88, column: 24) on node *** uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:1018:in `connect' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:934:in `do_start' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/net/http.rb:929:in `start' /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/vault-0.17.0/lib/vault/persistent.rb:693:in `start' /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/vault-0.17.0/lib/vault/persistent.rb:620:in `connection_for' /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/vault-0.17.0/lib/vault/persistent.rb:928:in `request' /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/vault-0.17.0/lib/vault/client.rb:287:in `request' /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/vault-0.17.0/lib/vault/client.rb:187:in `get' /opt/puppetlabs/server/data/puppetserver/jruby-gems/gems/vault-0.17.0/lib/vault/api/logical.rb:47:in `read' /var/lib/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:261:in `block in vault_get' org/jruby/RubyArray.java:1865:in `each' /var/lib/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:257:in `block in vault_get' org/jruby/RubyArray.java:1865:in `each' /var/lib/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:238:in `block in vault_get' org/jruby/RubyHash.java:1519:in `each' /var/lib/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:237:in `block in vault_get' org/jruby/ext/thread/Mutex.java:171:in `synchronize' /var/lib/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:195:in `vault_get' /var/lib/puppetlabs/code/environments/production/modules/hiera_vault/lib/puppet/functions/hiera_vault.rb:168:in `lookup_key' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatch.rb:60:in `invoke' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:47:in `block in dispatch' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:46:in `dispatch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:43:in `block in call' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:42:in `call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:53:in `block in lookup_key' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:50:in `lookup_key' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:27:in `invoke_with_location' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:20:in `block in unchecked_key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `block in lookup' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `block in lookup' org/jruby/RubyArray.java:1865:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:19:in `block in unchecked_key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:18:in `unchecked_key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/configured_data_provider.rb:56:in `block in unchecked_key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `block in lookup' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `block in lookup' org/jruby/RubyArray.java:1865:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/configured_data_provider.rb:55:in `block in unchecked_key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/configured_data_provider.rb:48:in `unchecked_key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/data_provider.rb:26:in `block in key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:97:in `check' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/data_provider.rb:26:in `key_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:157:in `lookup_in_environment' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:333:in `block in do_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `block in lookup' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `block in lookup' org/jruby/RubyArray.java:1865:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:221:in `lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:333:in `do_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:74:in `block in lookup' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:74:in `block in lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:73:in `block in lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:98:in `convert_result' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:72:in `block in lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:82:in `lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:59:in `lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup.rb:76:in `search_and_merge' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup.rb:31:in `block in lookup' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup.rb:31:in `block in lookup' org/jruby/RubyArray.java:1865:in `each' org/jruby/RubyEnumerable.java:1024:in `inject' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/lookup.rb:29:in `lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/functions/lookup.rb:210:in `do_lookup' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/functions/lookup.rb:190:in `lookup_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatch.rb:60:in `invoke' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:47:in `block in dispatch' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:46:in `dispatch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:43:in `block in call' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:42:in `call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/puppet_stack.rb:42:in `stack' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:305:in `block in call_function' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:303:in `call_function' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:995:in `call_function_with_block' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:964:in `eval_CallNamedFunctionExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:909:in `eval_AttributeOperation' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:864:in `block in eval_ResourceExpression' org/jruby/RubyArray.java:1865:in `each' org/jruby/RubyEnumerable.java:1024:in `inject' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:863:in `block in eval_ResourceExpression' org/jruby/RubyArray.java:2667:in `map' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:824:in `eval_ResourceExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:679:in `block in eval_BlockExpression' org/jruby/RubyArray.java:1865:in `each' org/jruby/RubyEnumerable.java:1024:in `inject' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:679:in `eval_BlockExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/parser/evaluating_parser.rb:60:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:27:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:63:in `block in evaluate' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:62:in `block in evaluate' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:61:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast.rb:30:in `safeevaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type.rb:80:in `evaluate_code' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:79:in `block in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:71:in `evaluate' org/jruby/RubyArray.java:1865:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:259:in `evaluate_classes' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_resource_support.rb:62:in `block in create_resources' org/jruby/RubyArray.java:2667:in `map' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_resource_support.rb:37:in `create_resources' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:340:in `create_resources' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:884:in `block in eval_ResourceExpression' org/jruby/RubyArray.java:2667:in `map' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:881:in `eval_ResourceExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:679:in `block in eval_BlockExpression' org/jruby/RubyArray.java:1865:in `each' org/jruby/RubyEnumerable.java:1024:in `inject' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:679:in `eval_BlockExpression' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/parser/evaluating_parser.rb:60:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:27:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:63:in `block in evaluate' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:62:in `block in evaluate' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:61:in `evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/ast.rb:30:in `safeevaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/type.rb:80:in `evaluate_code' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:79:in `block in evaluate' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/resource.rb:71:in `evaluate' org/jruby/RubyArray.java:1865:in `each' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:259:in `evaluate_classes' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/functions/include.rb:48:in `include' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatch.rb:60:in `invoke' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:47:in `block in dispatch' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:46:in `dispatch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:43:in `block in call' org/jruby/RubyKernel.java:1237:in `catch' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:42:in `call' /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/pops/puppet_stack.rb:42:in `stack' ```