Puppet Version: 6.20.0
Puppet Server Version: 6.15.0
OS Name/Version: CentOS Linux 7.9
Crafting a parser function file in a particular way causes most future catalog compilations to fail across all environments after the function is executed once, until puppetserver is restarted.
To reproduce, create a file in lib/puppet/parser/functions/bork.rb with the following contents:
doc: 'B0rks the puppetserver'
) do |args|
Then have an agent manifest call the `bork()` function.
Observe most future puppet runs fail, even for other nodes in other environments that previously worked before.
The error frequently seen is:
Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, undefined method `' for Puppet::Pops::Loader::RubyLegacyFunctionInstantiator::Puppet:Module
Catalog fails for the invalid parser function, and other catalogs work fine.
Most future catalog compilations fail, even for unrelated nodes in other environments that previously worked before the `bork()` function was called.
The following simple catalog is known to fail, where it previous works:
$test = pick($puppetmaster, $::fqdn)