[chef] Re: Re: Updating a template


Chronological Thread 
  • From: Kenneth Barry < >
  • To:
  • Subject: [chef] Re: Re: Updating a template
  • Date: Wed, 26 Mar 2014 12:56:20 -0700

"First of all, did you change the cookbook’s version?"
Yes, I changed the version of the cookbook

" If so, you should check which version was downloaded to the client. "
i don't know how to see what version was downloaded to the client (do you mean Node?), but what I do know if when i download from the chef server "knife cookbook download [name]" I get the old template file (containing the old content)

"If chef-client is downloading a different version than you expected, it could be caused by "


"dependency constraints in your environment or in other cookbooks,"
we are not using any constraints in our environments. period.


On Wed, Mar 26, 2014 at 11:44 AM, Daniel DeLeo < " target="_blank"> > wrote:


On Wednesday, March 26, 2014 at 11:27 AM, Kenneth Barry wrote:

> So, I went thru the rigors of trying to modify a template file this morning.
>
> I made a change to a template file. dollowed by a "knife cookbook upload [cookbooknamehere]
>
> chef-client on the node,
>
> the old template was taking effect
>
> so i then deleted the cache of all cookbooks ont he node,
>
> same problem,
>
> i getn deleted the cache on the node, and the cookbook (ALL VERSIONS) from the chef server, Changed the version of the cookbook, then uploaded again,
>
> same problem
>
> infact When I did knife cookbook download, it downloaded the cookbook with the told template file.
>
> My solution, (once I had decided that punching my screen wouldnt actually hurt the chef server), was to rename my template file, and change the name in my template resource, and upload.
>
> What I didnt do, was effectively delete what ever kinda cache there is on the chef server, i don't know if its even possible.
>
> Please tell me i'm retarded, and that i just need to add a "--stop-the-pain" at the end of the cookbook upload command.......
There’s a few places something could have gone wrong. First of all, did you change the cookbook’s version? If so, you should check which version was downloaded to the client. If chef-client is downloading a different version than you expected, it could be caused by dependency constraints in your environment or in other cookbooks, or perhaps a bug in the dependency solver.

If you did not modify the cookbook’s version, then there’s a few possibilities. Did you get a warning about cookbook overlays when you uploaded? That would indicate that you have another copy of the cookbook somewhere in your cookbook_path, and a combined copy of the cookbook is getting generated by knife when uploading. Otherwise, it could be a bug in knife or the server. I would need to look at the output of `knife cookbook upload -VV` and a subsequent `knife cookbook show COOKBOOK VERSION` to figure out what’s going on.


--
Daniel DeLeo







Archive powered by MHonArc 2.6.16.

§