Issue #23115 has been updated by Sam Kottler.
Dom, should this also get included in 3.3.2 or is it specific to the 3.2.x series? ---------------------------------------- Bug #23115: Function returning nil assigned to resource parameter causes value is a required option for Puppet::Parser::Resource::Param https://projects.puppetlabs.com/issues/23115#change-99934 * Author: Dominic Cleal * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: Dominic Cleal * Category: parser * Target version: * Affected Puppet version: 3.2.4 * Keywords: function resource parameter error * Branch: https://github.com/puppetlabs/puppet/pull/2049 ---------------------------------------- Given stdlib and the following manifest: notify { "a": message => getvar("foo"), } It references a variable that's unknown, so getvar() returns nil. This causes the following error: <pre> Error: value is a required option for Puppet::Parser::Resource::Param on node cobalt.fab.redhat.com /home/dcleal/code/puppet/puppet/lib/puppet/util/errors.rb:97:in `fail' /home/dcleal/code/puppet/puppet/lib/puppet/util/errors.rb:11:in `devfail' /home/dcleal/code/puppet/puppet/lib/puppet/util/methodhelper.rb:5:in `block in requiredopts' /home/dcleal/code/puppet/puppet/lib/puppet/util/methodhelper.rb:4:in `each' /home/dcleal/code/puppet/puppet/lib/puppet/util/methodhelper.rb:4:in `requiredopts' /home/dcleal/code/puppet/puppet/lib/puppet/parser/resource/param.rb:14:in `initialize' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resourceparam.rb:14:in `new' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resourceparam.rb:14:in `evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast.rb:62:in `safeevaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resource.rb:29:in `block (2 levels) in evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/branch.rb:12:in `block in each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/branch.rb:11:in `each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/branch.rb:11:in `each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resource.rb:28:in `collect' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resource.rb:28:in `block in evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/branch.rb:12:in `block in each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/branch.rb:11:in `each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/branch.rb:11:in `each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resource.rb:25:in `collect' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/resource.rb:25:in `evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast.rb:62:in `safeevaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/block_expression.rb:15:in `block in evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/block_expression.rb:10:in `each' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast/block_expression.rb:10:in `evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/ast.rb:62:in `safeevaluate' /home/dcleal/code/puppet/puppet/lib/puppet/resource/type.rb:121:in `evaluate_code' /home/dcleal/code/puppet/puppet/lib/puppet/parser/resource.rb:81:in `evaluate' /home/dcleal/code/puppet/puppet/lib/puppet/parser/compiler.rb:348:in `evaluate_main' /home/dcleal/code/puppet/puppet/lib/puppet/parser/compiler.rb:111:in `block in compile' /home/dcleal/code/puppet/puppet/lib/puppet/util/profiler/none.rb:6:in `profile' /home/dcleal/code/puppet/puppet/lib/puppet/util/profiler.rb:31:in `profile' /home/dcleal/code/puppet/puppet/lib/puppet/parser/compiler.rb:111:in `compile' /home/dcleal/code/puppet/puppet/lib/puppet/parser/compiler.rb:24:in `compile' /home/dcleal/code/puppet/puppet/lib/puppet/indirector/catalog/compiler.rb:88:in `block (2 levels) in compile' /home/dcleal/code/puppet/puppet/lib/puppet/util/profiler/none.rb:6:in `profile' /home/dcleal/code/puppet/puppet/lib/puppet/util/profiler.rb:31:in `profile' /home/dcleal/code/puppet/puppet/lib/puppet/indirector/catalog/compiler.rb:86:in `block in compile' /home/dcleal/code/puppet/puppet/lib/puppet/util.rb:162:in `block in benchmark' /home/dcleal/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/benchmark.rb:295:in `realtime' /home/dcleal/code/puppet/puppet/lib/puppet/util.rb:161:in `benchmark' /home/dcleal/code/puppet/puppet/lib/puppet/indirector/catalog/compiler.rb:85:in `compile' /home/dcleal/code/puppet/puppet/lib/puppet/indirector/catalog/compiler.rb:45:in `find' /home/dcleal/code/puppet/puppet/lib/puppet/indirector/indirection.rb:197:in `find' /home/dcleal/code/puppet/puppet/lib/puppet/application/apply.rb:204:in `main' /home/dcleal/code/puppet/puppet/lib/puppet/application/apply.rb:146:in `run_command' /home/dcleal/code/puppet/puppet/lib/puppet/application.rb:364:in `block (2 levels) in run' /home/dcleal/code/puppet/puppet/lib/puppet/application.rb:466:in `plugin_hook' /home/dcleal/code/puppet/puppet/lib/puppet/application.rb:364:in `block in run' /home/dcleal/code/puppet/puppet/lib/puppet/util.rb:485:in `exit_on_fail' /home/dcleal/code/puppet/puppet/lib/puppet/application.rb:364:in `run' /home/dcleal/code/puppet/puppet/lib/puppet/util/command_line.rb:132:in `run' /home/dcleal/code/puppet/puppet/lib/puppet/util/command_line.rb:86:in `execute' /home/dcleal/code/puppet/puppet/bin/puppet:4:in `<main>' </pre> Note the lack of manifest file/line metadata to help debug it. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
