[chef] Re: Re: First run on Ubuntu 12 node: /var/cache/chef/cookbooks hierarchy contains no files


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: First run on Ubuntu 12 node: /var/cache/chef/cookbooks hierarchy contains no files
  • Date: Sat, 8 Sep 2012 07:51:23 -0700


On Saturday, September 8, 2012 at 7:40 AM, Kevin Yank wrote:

On 08/09/2012, at 1:36 AM, Daniel DeLeo < "> > wrote:

Is it possible you're running two chef-client instances at once, perhaps one out of init/cron/upstart/runit/etc. and one in the foreground of the bootstrap? The run_list doesn't get saved until the end of the bootstrap run, so a second chef-client will see an empty run_list and then purge the cache of "unneeded" files.

Thanks so much, Daniel! Something like that may well be going on!

I have chef-solo installing chef-client, which gets launched as a daemon; however, the attributes I’m supplying for chef-client’s configuration aren’t being properly applied (a mystery I still need to look into), so I’m then patching /etc/chef/client.rb and running chef-client once to make sure it runs correctly before relaunching the daemon with ‘service chef-client restart’.

So yes, I’d say I have a race condition between the misconfigured chef-client daemon run and the config-patched ‘test run’. I should be able to fix that by killing the daemon before launching the test run.

--
Kevin Yank
Cool, glad to get you sorted out. We've added locking around chef-client runs in master, which should prevent this from happening. Since locking implementations and behaviors have historically varied between different operating systems, we're waiting until Chef 11 to release it so we can be sure it's well tested.

-- 
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§