Bug #3942
inadequate error messages for malformed host types
| Status: | Accepted | Start date: | 06/03/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | error reporting | |||
| Target version: | 2.7.x | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
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
Updated by James Turnbull almost 2 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.
Updated by Rob Terhaar almost 2 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