puppetdb improved logging

11 views
Skip to first unread message

David Schmitt

unread,
Aug 29, 2012, 7:11:26 AM8/29/12
to Puppet dev
Hi,

I was just hunting down a really nasty dependency problem, which could
only be found by this patch:

--- /tmp/puppetdb.rb.orig 2012-08-29 07:09:44.680687865 -0400
+++
/usr/lib/ruby/site_ruby/1.8/puppet/indirector/catalog/puppetdb.rb 2012-08-29
07:09:54.069673455 -0400
@@ -160,7 +160,7 @@
# and try that
other_resource = find_resource(hash['resources'], other_hash)
|| find_resource(hash['resources'], aliases[other_array])

- raise "Can't find resource #{other_ref} for relationship"
unless other_resource
+ raise "Can't find resource #{other_ref} for relationship to
#{resource_hash_to_ref(resource_hash)}" unless other_resource

if other_resource['exported']
raise "Can't create an edge between
#{resource_hash_to_ref(resource_hash)} and exported resource #{other_ref}"


I'm currently on the road and thus cannot provide a proper ticket :-(

Best Regards, David

Deepak Giridharagopal

unread,
Aug 29, 2012, 10:43:50 AM8/29/12
to puppe...@googlegroups.com
You're absolutely right...that error message is seriously unhelpful!

And in fact, we already have a ticket for this. :) The fix has already
been merged and will appear in the next version (which will be
released in a few days):

https://github.com/puppetlabs/puppetdb/pull/267

The patch should apply cleanly to your terminus if you need it
beforehand, and if it doesn't let us know and we can craft a patch for
you that works!

deepak

--
Deepak Giridharagopal / Puppet Labs
Reply all
Reply to author
Forward
0 new messages