Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
1
-
Week 2013-09-25 to 2013-10-02, Week 2013-10-02 to 2013-10-09
Description
When the Puppet 3.x compiler comes across a parameterized class, it will attempt to load parameter defaults from Hiera data bindings. If the bindings fail for any reason, an error message will be logged:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: can't convert String into Hash at /etc/puppet/environments/production/manifests/cluster/core/nodes.pp:4 on node puppet01.dev.example.net
The error message calls out the parameterized class that failed and its location in the puppet manifest, but doesn't include any indication that the failure actually occurred in Hiera. Unless a user immediately runs the compilation under `--trace`, they may waste a significant amount of time staring at manifest code that contains no errors.
It seems Puppet should do one of the following when a data binding fails:
- Log an Error that indicates the failure occurred in a data binding backend and indicate which terminus the indirector was calling and fail the compilation.
- Log a Warning with the above information and continue compilation using parameter defaults that were specified by the class definition in the Puppet manifest.