Issue #19955 has been updated by Melissa Stone.

Released in Puppet 3.4.0-rc1

----------------------------------------
Bug #19955: Misleading error when Hiera databindings fail
https://projects.puppetlabs.com/issues/19955#change-100633

* Author: Dolf Schimmel
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: databinding
* Target version: 3.4.0
* Affected Puppet version: 
* Keywords: error customer databinding hiera
* Branch: https://github.com/puppetlabs/puppet/pull/1964
----------------------------------------
Hi,

I just put created a hiera.yaml file with some invalid contents (`echo foobar > 
/etc/puppet/hiera.yaml`). When doing a puppet run, I'm confronted with the 
following error:

<pre>
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
</pre>

The contents of the nodes.pp file is:

<pre>
node 'puppet01.dev.node.net' inherits basenode {

  $manage_puppet = false
  include "cluster::core::puppetmaster::pupppet"

  include basenode::general

}
</pre>

Clearly the config file is not parsed, which is alright in this case. The error 
is quite misleading though, as it suggests some error had occurred in my 
manifest, while it was caused (and fixed afterwards) in hiera.yaml.

Proposed fix would be to change the error into something meaningful. Last week 
I had the same error causing me to debug for several hours, only to do a 
vagrant destroy.

<pre>
root@puppet01:/etc/puppet# puppet --version
3.1.1
root@puppet01:/etc/puppet# uname -a
Linux puppet01.dev.example.net 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 
20:39:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
</pre>


-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to