[chef] Re: Re: Re: Re: Re: Re: New user feedback and questions


Chronological Thread 
  • From: Joshua Timberman < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Re: Re: New user feedback and questions
  • Date: Wed, 9 Sep 2009 09:50:40 -0600

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sep 8, 2009, at 10:50 PM, Tim Uckun wrote:

I was able to get the client and the server talking each other.
I was able to deploy my cookbooks
My cookbooks all passed the syntax check.
My cookbook is failing to run on the client with a cryptic message
which I have yet to hunt down.

/usr/lib/ruby/1.8/chef/mixin/template.rb:33:in `render_template':
undefined local variable or method `client' for
#<Erubis::Context:0xb76d2010> (Chef::Mixin::Template::TemplateError)

Obviously one of my templates has an error in it.

Yes, that's an error from the template generator (Erubis) in parsing the template itself. Can you paste your template resource from the recipe, and the template contents (.erb) either in a gist/pastie or in a response?

BTW can chef email me the error? I would prefer that every time a
client had a problem it email me the message.


You could use Ruby's Net::SMTP in a cookbook library to do this, or set up a log parsing tool that reads the client output for messages and emails you when it finds something interesting. For example I've used logsurfer+ in the past for similar functionality (though not w/ Chef).

Net::SMTP RDoc:
http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html

Logsurfer+
http://www.crypt.gen.nz/logsurfer/

- --
Opscode, Inc
Joshua Timberman, Senior Solutions Engineer
C: 720.878.4322 E: 


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iEYEARECAAYFAkqnztAACgkQO97WSdVpzT2dDwCcCQjYPRsVYQ51Ncw9+mNtcmvF
drcAnisUoaxb1ahos/w7RtJcHIcK0pTb
=CTax
-----END PGP SIGNATURE-----



Archive powered by MHonArc 2.6.16.

§