The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

Bug #3942

inadequate error messages for malformed host types

Added by seph seph almost 4 years ago. Updated over 1 year ago.

Status:AcceptedStart date:06/03/2010
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:error reporting
Target version:-
Affected Puppet version:0.25.4 Branch:
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com

This ticket may be automatically exported to the PUP project on JIRA using the button below:


Description

When puppet encounters a malformed host type, say because the variable for the ip address is unassigned, it produces a hard to debug error messages. Using lucid, and the puppet packaged for it:

root@dell-r610-4v0hsl1:~# cat /tmp/host.pp 
host{ "test":
   ip => "",
 }

 root@dell-r610-4v0hsl1:~# puppet --version
 0.25.4

 root@dell-r610-4v0hsl1:~# puppet -v /tmp/host.pp 
 info: Loading facts in acpi_available
 info: Loading facts in interfaces
 Parameter ip failed: Invalid IP address

I’d really like to see the name of the offending file, and the line. And something me it was a host type.

This bug feels pretty much identical to #2633 (which I created awhile ago). Which makes me think there’s a meta issue around error messages, and not just these ad hoc bugs. Judging from the diff in #2633, this ends up being related to raising errors, and not calling self.fail? But I’m kinda grasping at straws. I suspect someone with more ruby and puppet internals knowledge could grep for cases of this.

History

#1 Updated by James Turnbull almost 4 years ago

  • Category set to error reporting
  • Status changed from Unreviewed to Accepted
  • Target version set to 2.7.x

There is a broader meta-problem that is in train to be addressed – probably in Statler.

#2 Updated by Rob Terhaar over 3 years ago

I’m also hitting this bug too unfortunately, however with a different missing fact. I’m glad that it’s in queue to get fixed, as I ran into this problem a while ago back in bug #2942

#3 Updated by Andrew Parker over 1 year ago

  • Target version deleted (2.7.x)

Also available in: Atom PDF