Package: puppetserver
Version: 7.9.5-2
Severity: important

Hi,

I totally lost hiera eyaml support while upgrading from bullseye to
bookworm. Neither the old hiera configuration file or the new one
worked. Given the upstream upgrade path, I totally understand that
there's little puppet packagers can do to ease the pain…

  https://www.puppet.com/docs/puppet/7/hiera_migrate#hiera_migrate

Just in case it helps others, here's what I ended up using, which
lets me use nodes/*.eyaml files:

,---[ /etc/puppet/hiera.yaml ]---
| ---
| # Hiera 5 Global configuration file
| 
| version: 5
| 
| defaults:
|   data_hash: yaml_data
|   datadir: code/hiera
| 
| hierarchy:
|   - name: "Per-node data"
|     paths:
|       - "nodes/%{trusted.certname}.yaml"
|       - "common.yaml"
| 
|   - name: "Per-node data (encrypted)"
|     path: "nodes/%{trusted.certname}.eyaml"
|     lookup_key: eyaml_lookup_key
|     options:
|       pkcs7_private_key: /var/lib/puppet/keys/private_key.pkcs7.pem
|       pkcs7_public_key: /var/lib/puppet/keys/public_key.pkcs7.pem
`---

But now I'm facing a bigger issue, which is that any use of hiera
triggers this error, and dozens of log lines:

    Lookup using eyaml lookup_key function is only supported when the 
hiera_eyaml library is present

I'm attaching a log excerpt with a trace.


Since I didn't want to keep a broken puppet {master,server} for too
long, I bit the bullet and tried installing the gem, which worked around
the immediate problem:

    puppetserver gem install hiera-eyaml

But it'd be great if that problem could be debugged and a proper
solution found, only using Debian packages… This is a rather small
setup, changes don't happen very often, there's nothing really
mission-critical, so I can happily assist debugging/running tests
if instructed.


Cheers,
-- 
Cyril Brulebois (k...@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
2023-08-19T19:10:39.064+02:00 ERROR [qtp614050581-42] [puppetserver] Puppet 
Evaluation Error: Error while evaluating a Function Call, Function Load Error 
for function 'eyaml_lookup_key': Lookup using eyaml lookup_key function is only 
supported when the hiera_eyaml library is present (file: 
/etc/puppet/code/environments/production/manifests/site.pp, line: 114, column: 
5) on node redacted.example.org
/usr/lib/ruby/vendor_ruby/puppet/functions.rb:193:in `create_function'
/usr/lib/ruby/vendor_ruby/puppet/functions/eyaml_lookup_key.rb:7:in `create'
org/jruby/RubyKernel.java:1091:in `eval'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/ruby_function_instantiator.rb:22:in
 `create'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/module_loaders.rb:284:in 
`instantiate'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/module_loaders.rb:277:in `find'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:173:in 
`internal_load'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:43:in `block in 
load_typed'
/usr/lib/ruby/vendor_ruby/puppet/concurrent/lock.rb:10:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/loader.rb:153:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:41:in `load_typed'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:165:in 
`internal_load'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:43:in `block in 
load_typed'
/usr/lib/ruby/vendor_ruby/puppet/concurrent/lock.rb:10:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/loader.rb:153:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:41:in `load_typed'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:165:in 
`internal_load'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:43:in `block in 
load_typed'
/usr/lib/ruby/vendor_ruby/puppet/concurrent/lock.rb:10:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/loader.rb:153:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:41:in `load_typed'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:165:in 
`internal_load'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:43:in `block in 
load_typed'
/usr/lib/ruby/vendor_ruby/puppet/concurrent/lock.rb:10:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/loader.rb:153:in `synchronize'
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:41:in `load_typed'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/function_provider.rb:91:in 
`load_function'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/function_provider.rb:79:in 
`function'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/function_provider.rb:37:in 
`create_function_context'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/function_provider.rb:33:in 
`function_context'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:48:in
 `lookup_key'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:31:in
 `block in invoke_with_location'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:30:in
 `invoke_with_location'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:20:in
 `block in unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:126:in `lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:19:in
 `block in unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_key_function_provider.rb:18:in
 `unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/configured_data_provider.rb:56:in 
`block in unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:132:in `block in lookup'
org/jruby/RubyKernel.java:1237:in `catch'
/usr/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:131:in `block in lookup'
org/jruby/RubyArray.java:1865:in `each'
org/jruby/RubyEnumerable.java:1024:in `inject'
/usr/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:129:in `block in lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with'
/usr/lib/ruby/vendor_ruby/puppet/pops/merge_strategy.rb:128:in `lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/configured_data_provider.rb:55:in 
`block in unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/configured_data_provider.rb:48:in 
`unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/global_data_provider.rb:51:in 
`unchecked_key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/data_provider.rb:26:in `block in 
key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:97:in `check'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/data_provider.rb:26:in `key_lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:132:in 
`lookup_global'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:373:in `block in 
global_lookup_options'
org/jruby/RubyKernel.java:1237:in `catch'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:373:in 
`global_lookup_options'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:382:in 
`env_lookup_options'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:348:in `block in 
retrieve_lookup_options'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:136:in `with'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:344:in `block in 
retrieve_lookup_options'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:82:in `lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:343:in 
`retrieve_lookup_options'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:237:in 
`lookup_lookup_options'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:64:in `block in 
lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/invocation.rb:82:in `lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup/lookup_adapter.rb:59:in `lookup'
/usr/lib/ruby/vendor_ruby/puppet/pops/lookup.rb:76:in `search_and_merge'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:266:in `block in 
inject_external_parameters'
org/jruby/RubyKernel.java:1237:in `catch'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:265:in `block in 
inject_external_parameters'
org/jruby/RubyHash.java:1519:in `each'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:261:in 
`inject_external_parameters'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:228:in 
`set_resource_parameters'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:69:in `evaluate_code'
/usr/lib/ruby/vendor_ruby/puppet/parser/resource.rb:79:in `block in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in 
`profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/parser/resource.rb:71:in `evaluate'
org/jruby/RubyArray.java:1865:in `each'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:259:in `evaluate_classes'
/usr/lib/ruby/vendor_ruby/puppet/functions/include.rb:48:in `include'
/usr/lib/ruby/vendor_ruby/puppet/pops/functions/dispatch.rb:60:in `invoke'
/usr/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:47:in `block in 
dispatch'
org/jruby/RubyKernel.java:1237:in `catch'
/usr/lib/ruby/vendor_ruby/puppet/pops/functions/dispatcher.rb:46:in `dispatch'
/usr/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:46:in `block in 
call'
org/jruby/RubyKernel.java:1237:in `catch'
/usr/lib/ruby/vendor_ruby/puppet/pops/functions/function.rb:45:in `call'
/usr/lib/ruby/vendor_ruby/puppet/pops/puppet_stack.rb:42:in `stack'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:305:in 
`block in call_function'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in 
`profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:303:in 
`call_function'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:995:in 
`call_function_with_block'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:964:in 
`eval_CallNamedFunctionExpression'
/usr/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in 
`evaluate'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:1058:in 
`block in eval_IfExpression'
/usr/lib/ruby/vendor_ruby/puppet/parser/scope.rb:985:in `with_guarded_scope'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:1056:in 
`eval_IfExpression'
/usr/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in 
`evaluate'
/usr/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'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:679:in 
`eval_BlockExpression'
/usr/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:94:in `visit_this_1'
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in 
`evaluate'
/usr/lib/ruby/vendor_ruby/puppet/pops/parser/evaluating_parser.rb:60:in 
`evaluate'
/usr/lib/ruby/vendor_ruby/puppet/parser/ast/pops_bridge.rb:27:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/parser/ast.rb:30:in `safeevaluate'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:77:in `block in evaluate_code'
/usr/lib/ruby/vendor_ruby/puppet/parser/scope.rb:985:in `with_guarded_scope'
/usr/lib/ruby/vendor_ruby/puppet/resource/type.rb:75:in `evaluate_code'
/usr/lib/ruby/vendor_ruby/puppet/parser/resource.rb:79:in `block in evaluate'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in 
`profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/parser/resource.rb:71:in `evaluate'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:225:in `evaluate_ast_node'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:134:in `block in compile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in 
`profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:134:in `block in compile'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:289:in `override'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:123:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/parser/compiler.rb:34:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:328:in `block 
in compile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler/around_profiler.rb:58:in 
`profile'
/usr/lib/ruby/vendor_ruby/puppet/util/profiler.rb:51:in `profile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:326:in `block 
in compile'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:245:in `block in benchmark'
/usr/share/jruby/lib/ruby/stdlib/benchmark.rb:308:in `realtime'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:244:in `benchmark'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:324:in `compile'
/usr/lib/ruby/vendor_ruby/puppet/indirector/catalog/compiler.rb:68:in `block in 
find'

Reply via email to