Chef 11 issues with updating resources


#1

Hi,

Chef 11 is not updating resources. If I add a resource. Great. It works.
I make a change…boom. Still uses the old resource. I am using hosted
chef.

This applies to templates and more recently a git resource. Now because of
a bug in my code, all chef runs fail. I commented out the resource, push
to chef server, I see that the code is commented out when I view the recipe
on hosted chef…but chef runs still fail because its using the old code.

If I dont get this fixed I will have to do a rolling upgrade on every dev
server. Thank god this was not in production where I a using 10x a and I
have no issues.

What could this problem be? I think basic of chef and hosted chef is my
chef runs should reflect the recipes that are on hosted chef. I make a
change to an existing resource…nope…not the case.

Please advise…

Thanks


#2

So this is with hosted chef, and the problem is that when you run
chef-client, the downloaded cookbooks aren’t the latest versions?

are you changing the version numbers of the cookbooks with each update?
(This is not required, and it should work even if you don’t)
If so, what numbers are you using? maybe it is interpreting the newer
versions as older or something weird like that.

have you verified this by looking in the /var/chef/cache/cookbooks or
/var/cache/chef/cookbooks or wherever your systems are storing the cookbook
cache?

On Sun, Mar 3, 2013 at 7:58 AM, David Montgomery
davidmontgomery@gmail.comwrote:

Hi,

Chef 11 is not updating resources. If I add a resource. Great. It
works. I make a change…boom. Still uses the old resource. I am using
hosted chef.

This applies to templates and more recently a git resource. Now because
of a bug in my code, all chef runs fail. I commented out the resource,
push to chef server, I see that the code is commented out when I view the
recipe on hosted chef…but chef runs still fail because its using the
old code.

If I dont get this fixed I will have to do a rolling upgrade on every dev
server. Thank god this was not in production where I a using 10x a and I
have no issues.

What could this problem be? I think basic of chef and hosted chef is my
chef runs should reflect the recipes that are on hosted chef. I make a
change to an existing resource…nope…not the case.

Please advise…

Thanks


#3

If you did change the cookbook version number, another possibility is that
you have specified version constraints in your environment (or role, or
node). If so it may be as simple as adjusting your version constraints.

On Sun, Mar 3, 2013 at 11:34 AM, Jesse Campbell hikeit@gmail.com wrote:

So this is with hosted chef, and the problem is that when you run
chef-client, the downloaded cookbooks aren’t the latest versions?

are you changing the version numbers of the cookbooks with each update?
(This is not required, and it should work even if you don’t)
If so, what numbers are you using? maybe it is interpreting the newer
versions as older or something weird like that.

have you verified this by looking in the /var/chef/cache/cookbooks or
/var/cache/chef/cookbooks or wherever your systems are storing the cookbook
cache?

On Sun, Mar 3, 2013 at 7:58 AM, David Montgomery <
davidmontgomery@gmail.com> wrote:

Hi,

Chef 11 is not updating resources. If I add a resource. Great. It
works. I make a change…boom. Still uses the old resource. I am using
hosted chef.

This applies to templates and more recently a git resource. Now because
of a bug in my code, all chef runs fail. I commented out the resource,
push to chef server, I see that the code is commented out when I view the
recipe on hosted chef…but chef runs still fail because its using the
old code.

If I dont get this fixed I will have to do a rolling upgrade on every dev
server. Thank god this was not in production where I a using 10x a and I
have no issues.

What could this problem be? I think basic of chef and hosted chef is my
chef runs should reflect the recipes that are on hosted chef. I make a
change to an existing resource…nope…not the case.

Please advise…

Thanks


Matthew Delaney
Cloud Developer
Cybera Inc.


Cybera is a not-for-profit organization that works to spur and support
innovation, for the economic benefit of Alberta, through the use
of cyberinfrastructure.