[chef] Re: Re: Re: cookbook files/ directory not syncd, chef-client a noop but shef -z "run_chef" works


Chronological Thread 
  • From: Charles Duffy < >
  • To:
  • Subject: [chef] Re: Re: Re: cookbook files/ directory not syncd, chef-client a noop but shef -z "run_chef" works
  • Date: Tue, 18 Jan 2011 21:46:44 -0600

...well, damnit --

I went back and tried to reproduce this fix, but it looks like I'm hitting a different failure mode now -- I'm getting a FileNotFound thrown from preferred_manifest_record, which is called shortly *before* file_vendor is referenced.

Like the prior failure, this happens only with 'shef -z' but not using run_client:

Chef::Exceptions::FileNotFound: cookbook loggly does not contain file files/loggly.com.crt
        from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/cookbook_version.rb:527:in `preferred_manifest_record'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/cookbook_version.rb:532:in `preferred_filename_on_disk_location'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/provider/cookbook_file.rb:63:in `file_cache_location'
        from /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/lib/chef/provider/cookbook_file.rb:36:in `action_create'

On Wed, Dec 29, 2010 at 6:33 PM, Charles Duffy < "> > wrote:
Dan --

Thank you for those extraordinarily detailed bug reports, which were sufficient for me (as a non-rubyist) to patch my shef into a functional state (in one case with a minor tweak, "@rest" rather than "rest").

For anyone else interested --

On Wed, Dec 29, 2010 at 5:37 PM, Daniel DeLeo < " target="_blank"> > wrote:
Ohai!

On Wed, Dec 29, 2010 at 8:26 AM, Charles Duffy < " target="_blank"> > wrote:
> Doing a bit more research --
> At least one item was simply a matter of me confusing myself -- my
> expectation that cookbook files would be stored in the cache on the client
> node appears to have been simply inaccurate. Watching the HTTP PUT by knife
> cookbook upload clearly shows the files in question being put, and their
> names and signatures are included when the node retrieves its list of
> cookbooks. I simply wasn't seeing anything being done with run_client on
> account of it being less verbose than shef's default logging level (and
> because my run_list was inappropriately constructed, not including the
> recipe in which I was inserting extra logging).
> It looks like there's only one real issue here, and I'm wondering if it's
> simply a limitation of the "solo" mode shef -z runs in:

I think there's possibly two bugs here. One is that even though you
ran shef in "chef-client" mode, it says it's in solo mode. The
offending code is here:

https://github.com/opscode/chef/blob/master/chef/lib/chef/shef/shef_session.rb#L177

This is annoying, but probably unrelated to being unable to use
cookbook files. The root cause of the cookbook file bug is that shef
is not configuring the cookbook fetching system to work as a
chef-client so it doesn't know if it should be getting cookbook files
and templates from disk (like chef-solo) or from the remote server
(like chef-client).

I'll create tickets for these.

Dan




  • [chef] Re: Re: Re: cookbook files/ directory not syncd, chef-client a noop but shef -z "run_chef" works, Charles Duffy, 01/18/2011

Archive powered by MHonArc 2.6.16.

§