Bug #2250
Error message for a missing template could be clearer
| Status: | Closed | Start: | 05/12/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | language | |||
| Target version: | 0.25.0 | |||
| Affected version: | 0.24.8 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
I had this in my init.pp for an “openldap” module:
content => template(“slapd.conf.erb”)
The error I got was:
Could not retrieve catalog: can’t convert nil into String at /etc/puppet/modules/openldap/manifests/init.pp:48 on node server7"
Turns out that changing the template() to “openldap/slapd.conf.erb” fixed it. Thanks to IRC. If might be helpful to make it error out saying it can’t find the template file or something similar.
Associated revisions
Revision 07ff4be92a1d46fe0f6ec3de3c33b5a3b99be755
Fixing #2250 – Missing templates throw a helpful error
This changes the behaviour of template searching a bit – we previously usually returned a file name, whether the template existed or not. Now we only return a path if it exists.
Refactoring a few of the the tests for TemplateWrapper, also.
Signed-off-by: Luke Kanies luke@madstop.com
History
Updated by Luke Kanies over 1 year ago
- Category set to language
- Status changed from Unreviewed to Accepted
- Target version set to 0.25.0
Updated by Stéphan Gorget old account over 1 year ago
I’ve submitted a patch http://groups.google.com/group/puppet-dev/browse_thread/thread/84a34458cabc7033
Updated by Luke Kanies over 1 year ago
- Status changed from Accepted to Ready for Checkin
- Assignee set to James Turnbull
Fixed in the tickets/master/2250 branch in my repo.
Updated by James Turnbull over 1 year ago
- Status changed from Ready for Checkin to Closed
Pushed in commit:“07ff4be92a1d46fe0f6ec3de3c33b5a3b99be755” in branch master.