[chef] Re: Re: Supervisor missing templates


Chronological Thread 
  • From: Daniel DeLeo < >
  • To:
  • Subject: [chef] Re: Re: Supervisor missing templates
  • Date: Mon, 21 Jul 2014 19:09:52 -0700

On Monday, July 21, 2014 at 6:59 PM, Ben Bytheway wrote:
> I have also seen this behavior, but haven't gotten to the bottom of it. If 
> I knife download my cookbook, the template is there, but chef-client 
> doesn't get it. Isn't in /var/chef/cache at all.


Templates are downloaded on demand, as they are used by resources. If you 
never use them, then chef doesn’t download them. If I remember correctly, 
there might also be a small bug where templates that are used can be removed 
at the end of a chef-client run (but they’re downloaded the next time so it’s 
just wasting a bit of IO). Have you seen a cookbook fail to execute for this 
reason?  

Also, if you just don’t like this behavior, you can configure `no_lazy_load 
true` to make chef-client fetch all templates (and cookbook files, which have 
the same behavior) eagerly.

FWIW, eager load will be the default in Chef 12 since the URLs to fetch the 
files are time-limited and on long chef-client runs (an hour or more), the 
URLs expire and cause errors.

--  
Daniel DeLeo




Archive powered by MHonArc 2.6.16.

§