Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-4636

Manifest with future parser code fails in a non-production environment with environment.conf parser=future setting

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: PUP 3.8.0
    • Fix Version/s: PUP 3.8.1
    • Component/s: Language
    • Labels:
    • Template:
    • Story Points:
      1
    • Sprint:
      Language 2015-05-27
    • Release Notes:
      Bug Fix

      Description

      Testing the following setup:

      • Puppet 3.8.0
      • puppet.conf
        • environmentpath=$confdir/environments
      • environments/production
        • no environment.conf
      • environments/testing/environment.conf
        • parser=future
      • environment/testing/manifests/site.pp

      notify { 'testing env': }
      $list = [1,2,3]
      $listb = $list.map |$i| {
          $i + 1 
      }
      notify { "list: ${list}": }
      notify { "listb: ${listb}": }
      

      `puppet agent -t` (against a webrick master serving those environments)

      is raising:

      Error: Evaluation Error: Error while evaluating a Method call, uninitialized constant Puppet::Pops::Loaders at /home/jpartlow/test/master/parser-settings/environments/testing/manifests/site.pp:3:15 on node
       percival.corp.puppetlabs.net
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:277:in `loaders'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/runtime3_support.rb:234:in `call_function'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:833:in `call_function_with_block'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:825:in `eval_CallMethodExpression'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:43:in `block in visit_this'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:39:in `each'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:39:in `visit_this'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:66:in `visit_this_1'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:299:in `eval_AssignmentExpression'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:64:in `visit_this_1'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:563:in `block in eval_BlockExpression'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:563:in `each'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:563:in `eval_BlockExpression'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:43:in `block in visit_this'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:39:in `each'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:39:in `visit_this'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:66:in `visit_this_1'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:634:in `eval_Program'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:43:in `block in visit_this'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:39:in `each'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:39:in `visit_this'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/visitor.rb:66:in `visit_this_1'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/evaluator/evaluator_impl.rb:77:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/pops/parser/evaluating_parser.rb:57:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/ast/pops_bridge.rb:96:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/ast.rb:61:in `safeevaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/ast/block_expression.rb:11:in `block in evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/ast/block_expression.rb:10:in `each'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/ast/block_expression.rb:10:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/ast.rb:61:in `safeevaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/resource/type.rb:127:in `evaluate_code'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/resource.rb:79:in `evaluate'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:429:in `evaluate_main'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:135:in `block (2 levels) in compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler.rb:51:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:135:in `block (2 levels) in compile'                                                                                                [59/1875]
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler.rb:51:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:135:in `block in compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/context.rb:64:in `override'
      /home/jpartlow/work/src/pl/puppet/lib/puppet.rb:244:in `override'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:121:in `compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/parser/compiler.rb:34:in `compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/indirector/catalog/compiler.rb:95:in `block (2 levels) in compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler.rb:51:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/indirector/catalog/compiler.rb:93:in `block in compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util.rb:161:in `block in benchmark'
      /home/jpartlow/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util.rb:160:in `benchmark'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/indirector/catalog/compiler.rb:92:in `compile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/indirector/catalog/compiler.rb:52:in `find'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/indirector/indirection.rb:201:in `find'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/api/v1.rb:105:in `do_find'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/api/v1.rb:50:in `block in call'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/context.rb:64:in `override'
      /home/jpartlow/work/src/pl/puppet/lib/puppet.rb:244:in `override'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/api/v1.rb:49:in `call'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/route.rb:82:in `block in process'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/route.rb:81:in `each'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/route.rb:81:in `process'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/handler.rb:63:in `block in process'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler/around_profiler.rb:58:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/util/profiler.rb:51:in `profile'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/handler.rb:61:in `process'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/webrick/rest.rb:37:in `block in service'
      <internal:prelude>:10:in `synchronize'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/webrick/rest.rb:36:in `service'
      /home/jpartlow/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
      /home/jpartlow/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
      /home/jpartlow/work/src/pl/puppet/lib/puppet/network/http/webrick.rb:33:in `block (2 levels) in listen'
      /home/jpartlow/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/server.rb:191:in `call'
      /home/jpartlow/.rbenv/versions/1.9.3-p484/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
      

      UPDATE

      A workaround is to set the default environment to use future parser, and then in each environment that should not use future parser, set parser==current. While this is painful until this is released it is the only way to use parser setting per environment in puppet 3.8.0.

        Attachments

          Activity

            jsd-sla-details-panel

              People

              • Assignee:
                Unassigned
                Reporter:
                joshua.partlow Joshua Partlow
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: