# Upgrading from chef 11 to 12

**URL:** https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369
**Category:** Chef Infra (archive)
**Created:** [February 6, 2015, 2:08am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369 "2015-02-06T02:08:44Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![drpebcak](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@drpebcak](https://discourse.chef.io/u/drpebcak)
#### Post date: [February 6, 2015, 2:08am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/1 "2015-02-06T02:08:44Z")

</div>

Hey guys,

I’m looking to upgrade my chef server to chef 12, and I want to get opinions on the transition. Am I going to have any issues upgrading?

Are there any compatability issues with cookbooks written with chef 11 in mind?

---

<div class="post-metadata">

### Author: ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)
#### Post date: [February 6, 2015, 2:52am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/2 "2015-02-06T02:52:52Z")

</div>

On Thursday, February 5, 2015 at 6:08 PM, Taylor Price wrote:

> Hey guys,
> 
> I'm looking to upgrade my chef server to chef 12, and I want to get opinions on the transition. Am I going to have any issues upgrading?
> 
> Are there any compatability issues with cookbooks written with chef 11 in mind?  
> FYI, you don’t have to upgrade your clients and server in lockstep. 11.x clients work with 12.x server and vice versa.

There are a handful of minor compatibility breakages between Chef Client 11.x and Chef Client 12.x. One of the most significant is that SSL certificate verification is enabled by default. So before you upgrade clients, fix the ssl warnings from chef-client 11 (I think these were introduced in chef-client 11.8 or so) and try running with `ssl_verify_mode :verify_peer` in your client.rb. If you can’t possibly get that to work, you can opt out in client 12.x by setting `ssl_verify_mode :verify_none` (but you should really try to avoid that). Most of the other significant changes are documented here: [Chef Infra Client Release Notes](http://docs.chef.io/release_notes.html) and here: [https://github.com/chef/chef-rfc/blob/master/rfc015-chef-12.md](https://github.com/chef/chef-rfc/blob/master/rfc015-chef-12.md)

On the server side, you might be interested in doing a restore to a fresh Chef 12 installation for testing, which is discussed in this thread: [chef - [chef] Re: Re: migrating from chef 11 to chef 12 server](http://lists.opscode.com/sympa/arc/chef/2014-10/msg00117.html)

HTH,

--  
Daniel DeLeo

---

<div class="post-metadata">

### Author: ![Phil\_Dibowitz](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@Phil\_Dibowitz](https://discourse.chef.io/u/Phil_Dibowitz)
#### Post date: [February 6, 2015, 3:24am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/3 "2015-02-06T03:24:35Z")

</div>

On Thu, Feb 05, 2015 at 06:52:52PM -0800, Daniel DeLeo wrote:

> On Thursday, February 5, 2015 at 6:08 PM, Taylor Price wrote:
> 
> > Hey guys,
> > 
> > I'm looking to upgrade my chef server to chef 12, and I want to get opinions on the transition. Am I going to have any issues upgrading?
> > 
> > Are there any compatability issues with cookbooks written with chef 11 in mind?  
> > FYI, you don’t have to upgrade your clients and server in lockstep. 11.x clients work with 12.x server and vice versa.

That's not... ENTIRELY true. You need a config change on EC11 in order for  
it to accept Chef 12 clients... It's not clear of the OP was using OSC11 or  
EC11.

The config change is:

lb['chef\_max\_version'] = 12

--  
Phil Dibowitz [phil@ipom.com](mailto:phil@ipom.com)  
Open Source software and tech docs Insanity Palace of Metallica  
[http://www.phildev.net/](http://www.phildev.net/)[http://www.ipom.com/](http://www.ipom.com/)

"Be who you are and say what you feel, because those who mind don't matter  
and those who matter don't mind."

- Dr. Seuss

---

<div class="post-metadata">

### Author: ![drpebcak](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@drpebcak](https://discourse.chef.io/u/drpebcak)
#### Post date: [February 6, 2015, 3:58am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/4 "2015-02-06T03:58:15Z")

</div>

I'm sorry, I am using Open Source Chef 11. Looking at the milestone for  
12.1.0, there seem to be a decent number of open bugs, but nothing that  
looks breaking for me. I will give this a go soon!

On Thu, Feb 5, 2015 at 8:24 PM, Phil Dibowitz [phil@ipom.com](mailto:phil@ipom.com) wrote:

> On Thu, Feb 05, 2015 at 06:52:52PM -0800, Daniel DeLeo wrote:
> 
> > On Thursday, February 5, 2015 at 6:08 PM, Taylor Price wrote:
> > 
> > > Hey guys,
> > > 
> > > I'm looking to upgrade my chef server to chef 12, and I want to get  
> > > opinions on the transition. Am I going to have any issues upgrading?
> > > 
> > > Are there any compatability issues with cookbooks written with chef 11  
> > > in mind?  
> > > FYI, you don’t have to upgrade your clients and server in lockstep. 11.x  
> > > clients work with 12.x server and vice versa.
> 
> That's not... ENTIRELY true. You need a config change on EC11 in order for  
> it to accept Chef 12 clients... It's not clear of the OP was using OSC11 or  
> EC11.
> 
> The config change is:
> 
> lb['chef\_max\_version'] = 12
> 
> --  
> Phil Dibowitz [phil@ipom.com](mailto:phil@ipom.com)  
> Open Source software and tech docs Insanity Palace of Metallica  
> [http://www.phildev.net/](http://www.phildev.net/)[http://www.ipom.com/](http://www.ipom.com/)
> 
> "Be who you are and say what you feel, because those who mind don't matter  
> and those who matter don't mind."
> 
> - Dr. Seuss

---

<div class="post-metadata">

### Author: ![M\_G](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@M\_G](https://discourse.chef.io/u/M_G)
#### Post date: [February 6, 2015, 4:42am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/5 "2015-02-06T04:42:16Z")

</div>

Hi  
When i do  
knife search node name:devwsgw20150130113529 -a tomcat.user1 items found  
devwsgw20150130113529: tomcat.user: tomcat  
I see there is an attribute called tomcat.user  
In recipe I am using,  
tcuser=node.attribute[:tomcat][:user]log “tc user is #{tcuser}”

When I run the chef-client on the above node, i see the following line printed  
Compiling Cookbooks…Converging 14 resourcesRecipe: update::deploy \* log[tc user is] action write  
Why can knife search the attribute and the recipe cannot?  
Please provide pointers/suggestions.  
Regards  
mg

---

<div class="post-metadata">

### Author: ![AJ\_Christensen2](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/aj_christensen2/32/42_2.png) [@AJ\_Christensen2](https://discourse.chef.io/u/AJ_Christensen2)
#### Post date: [February 6, 2015, 4:45am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/6 "2015-02-06T04:45:11Z")

</div>

```auto
tcuser=node.attribute[:tomcat][:user]
log "tc user is #{tcuser}"

```

this is wrong, you want something like:

```auto
tcuser = node['tomcat']['user']

```

in your Recipe. I don't know that `node.attribute` does what you mean.

cheers,

--aj

On Fri, Feb 6, 2015 at 5:42 PM, M G [meher03@hotmail.com](mailto:meher03@hotmail.com) wrote:

> Hi
> 
> When i do
> 
> knife search node name:devwsgw20150130113529 -a tomcat.user  
> 1 items found
> 
> devwsgw20150130113529:  
> tomcat.user: tomcat
> 
> I see there is an attribute called tomcat.user
> 
> In recipe I am using,
> 
> tcuser=node.attribute[:tomcat][:user]  
> log "tc user is #{tcuser}"
> 
> When I run the chef-client on the above node, i see the following line  
> printed
> 
> Compiling Cookbooks...  
> Converging 14 resources  
> Recipe: update::deploy
> 
> - log[tc user is] action write
> 
> Why can knife search the attribute and the recipe cannot?
> 
> Please provide pointers/suggestions.
> 
> Regards
> 
> mg

---

<div class="post-metadata">

### Author: ![M\_G](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@M\_G](https://discourse.chef.io/u/M_G)
#### Post date: [February 6, 2015, 7:47am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/7 "2015-02-06T07:47:32Z")

</div>

Hi AJ  
OK. I ran the recipe using your suggestion and still the variable tcuser comes up empty when running on the node.  
knife search node name:devwsgw20150130113529 -a tomcat1 items found  
devwsgw20150130113529: tomcat: base: /opt/apache-tomcat-7.0.54 user: tomcat  
As you can see the attribute tomcat has two child attributes base and user with values in them.  
In the recipe, I have the following code:  
tc=node.attribute[:tomcat][:base]log "tc base is #{tc}"tcuser=node[‘tomcat’][‘user’]log "tc user is #{tcuser}"  
And while running it I get

- log[tc base is /opt/apache-tomcat-7.0.54] action write
- log[tc user is] action write  
So you see using the colon notation I am able to get the value of tomcat’s child attribute “base” but using the colon notation and your suggested notation I get nothing. This is strange behavior that I have not encountered .  
Any suggestions/pointers ?  
Regards  
mg  
Date: Fri, 6 Feb 2015 17:45:11 +1300  
From: aj@junglistheavy.industries  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Knife search shows attributes but cannot find same attribute in recipe

````auto
log "tc user is #{tcuser}"```
this is wrong, you want something like:
```tcuser = node['tomcat']['user']```
in your Recipe. I don't know that `node.attribute` does what you mean.
cheers,
--aj
On Fri, Feb 6, 2015 at 5:42 PM, M G <meher03@hotmail.com> wrote:

Hi
When i do 
knife search node name:devwsgw20150130113529 -a tomcat.user1 items found
devwsgw20150130113529: tomcat.user: tomcat
I see there is an attribute called tomcat.user
In recipe I am using,
tcuser=node.attribute[:tomcat][:user]log "tc user is #{tcuser}"

When I run the chef-client on the above node, i see the following line printed
Compiling Cookbooks...Converging 14 resourcesRecipe: update::deploy * log[tc user is] action write
Why can knife search the attribute and the recipe cannot?
Please provide pointers/suggestions.
Regards
mg
````

---

<div class="post-metadata">

### Author: ![AJ\_Christensen2](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/aj_christensen2/32/42_2.png) [@AJ\_Christensen2](https://discourse.chef.io/u/AJ_Christensen2)
#### Post date: [February 6, 2015, 7:57am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/8 "2015-02-06T07:57:21Z")

</div>

try `node.debug_value(:tc, :user)` in a chef-shell with the attributes  
loaded or in your Recipe DSL [0]; you should be able to determine the  
source of your attribute woes. Given that you have not shared with us your  
attribute structure (cookbooks, roles, environments, json attributes, ohai  
custom plugins) without additional diagnostics, my recommendations are  
limited.

Please provide a full debug log if possible, too! `-ldebug` or similar.

cheers,

--aj

[http://jtimberman.housepub.org/blog/2014/09/02/chef-node-dot-debug-value/](http://jtimberman.housepub.org/blog/2014/09/02/chef-node-dot-debug-value/)

On Fri, Feb 6, 2015 at 8:47 PM, M G [meher03@hotmail.com](mailto:meher03@hotmail.com) wrote:

> Hi AJ
> 
> OK. I ran the recipe using your suggestion and still the variable tcuser  
> comes up empty when running on the node.
> 
> knife search node name:devwsgw20150130113529 -a tomcat  
> 1 items found
> 
> devwsgw20150130113529:  
> tomcat:  
> base: /opt/apache-tomcat-7.0.54  
> user: tomcat
> 
> As you can see the attribute tomcat has two child attributes base and user  
> with values in them.
> 
> In the recipe, I have the following code:
> 
> tc=node.attribute[:tomcat][:base]  
> log "tc base is #{tc}"  
> tcuser=node['tomcat']['user']  
> log "tc user is #{tcuser}"
> 
> And while running it I get
> 
> - log[tc base is /opt/apache-tomcat-7.0.54] action write
> 
> - log[tc user is] action write
> 
> So you see using the colon notation I am able to get the value of tomcat's  
> child attribute "base"  
> but using the colon notation and your suggested notation I get nothing.  
> This is strange behavior that I have not encountered .
> 
> Any suggestions/pointers ?
> 
> Regards
> 
> mg
> 
> * * *
> 
> Date: Fri, 6 Feb 2015 17:45:11 +1300  
> From: aj@junglistheavy.industries  
> To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> Subject: [chef] Re: Knife search shows attributes but cannot find same  
> attribute in recipe
> 
> ```auto
> tcuser=node.attribute[:tomcat][:user]
> log "tc user is #{tcuser}"
> 
> ```
> 
> this is wrong, you want something like:
> 
> ```auto
> tcuser = node['tomcat']['user']
> 
> ```
> 
> in your Recipe. I don't know that `node.attribute` does what you mean.
> 
> cheers,
> 
> --aj
> 
> On Fri, Feb 6, 2015 at 5:42 PM, M G [meher03@hotmail.com](mailto:meher03@hotmail.com) wrote:
> 
> Hi
> 
> When i do
> 
> knife search node name:devwsgw20150130113529 -a tomcat.user  
> 1 items found
> 
> devwsgw20150130113529:  
> tomcat.user: tomcat
> 
> I see there is an attribute called tomcat.user
> 
> In recipe I am using,
> 
> tcuser=node.attribute[:tomcat][:user]  
> log "tc user is #{tcuser}"
> 
> When I run the chef-client on the above node, i see the following line  
> printed
> 
> Compiling Cookbooks...  
> Converging 14 resources  
> Recipe: update::deploy
> 
> - log[tc user is] action write
> 
> Why can knife search the attribute and the recipe cannot?
> 
> Please provide pointers/suggestions.
> 
> Regards
> 
> mg

---

<div class="post-metadata">

### Author: ![AJ\_Christensen2](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/aj_christensen2/32/42_2.png) [@AJ\_Christensen2](https://discourse.chef.io/u/AJ_Christensen2)
#### Post date: [February 6, 2015, 8:01am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/9 "2015-02-06T08:01:12Z")

</div>

oh sorry, `node.debug_value(:tomcat)` or `(:tomcat, :user)`

cheers,

--aj

On Fri, Feb 6, 2015 at 8:57 PM, AJ Christensen [aj@junglistheavy.industries](mailto:aj@junglistheavy.industries)  
wrote:

> try `node.debug_value(:tc, :user)` in a chef-shell with the attributes  
> loaded or in your Recipe DSL [0]; you should be able to determine the  
> source of your attribute woes. Given that you have not shared with us your  
> attribute structure (cookbooks, roles, environments, json attributes, ohai  
> custom plugins) without additional diagnostics, my recommendations are  
> limited.
> 
> Please provide a full debug log if possible, too! `-ldebug` or similar.
> 
> cheers,
> 
> --aj
> 
> [http://jtimberman.housepub.org/blog/2014/09/02/chef-node-dot-debug-value/](http://jtimberman.housepub.org/blog/2014/09/02/chef-node-dot-debug-value/)
> 
> On Fri, Feb 6, 2015 at 8:47 PM, M G [meher03@hotmail.com](mailto:meher03@hotmail.com) wrote:
> 
> > Hi AJ
> > 
> > OK. I ran the recipe using your suggestion and still the variable tcuser  
> > comes up empty when running on the node.
> > 
> > knife search node name:devwsgw20150130113529 -a tomcat  
> > 1 items found
> > 
> > devwsgw20150130113529:  
> > tomcat:  
> > base: /opt/apache-tomcat-7.0.54  
> > user: tomcat
> > 
> > As you can see the attribute tomcat has two child attributes base and  
> > user with values in them.
> > 
> > In the recipe, I have the following code:
> > 
> > tc=node.attribute[:tomcat][:base]  
> > log "tc base is #{tc}"  
> > tcuser=node['tomcat']['user']  
> > log "tc user is #{tcuser}"
> > 
> > And while running it I get
> > 
> > - log[tc base is /opt/apache-tomcat-7.0.54] action write
> > 
> > - log[tc user is] action write
> > 
> > So you see using the colon notation I am able to get the value of  
> > tomcat's child attribute "base"  
> > but using the colon notation and your suggested notation I get nothing.  
> > This is strange behavior that I have not encountered .
> > 
> > Any suggestions/pointers ?
> > 
> > Regards
> > 
> > mg
> > 
> > * * *
> > 
> > Date: Fri, 6 Feb 2015 17:45:11 +1300  
> > From: aj@junglistheavy.industries  
> > To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> > Subject: [chef] Re: Knife search shows attributes but cannot find same  
> > attribute in recipe
> > 
> > ```auto
> > tcuser=node.attribute[:tomcat][:user]
> > log "tc user is #{tcuser}"
> > 
> > ```
> > 
> > this is wrong, you want something like:
> > 
> > ```auto
> > tcuser = node['tomcat']['user']
> > 
> > ```
> > 
> > in your Recipe. I don't know that `node.attribute` does what you mean.
> > 
> > cheers,
> > 
> > --aj
> > 
> > On Fri, Feb 6, 2015 at 5:42 PM, M G [meher03@hotmail.com](mailto:meher03@hotmail.com) wrote:
> > 
> > Hi
> > 
> > When i do
> > 
> > knife search node name:devwsgw20150130113529 -a tomcat.user  
> > 1 items found
> > 
> > devwsgw20150130113529:  
> > tomcat.user: tomcat
> > 
> > I see there is an attribute called tomcat.user
> > 
> > In recipe I am using,
> > 
> > tcuser=node.attribute[:tomcat][:user]  
> > log "tc user is #{tcuser}"
> > 
> > When I run the chef-client on the above node, i see the following line  
> > printed
> > 
> > Compiling Cookbooks...  
> > Converging 14 resources  
> > Recipe: update::deploy
> > 
> > - log[tc user is] action write
> > 
> > Why can knife search the attribute and the recipe cannot?
> > 
> > Please provide pointers/suggestions.
> > 
> > Regards
> > 
> > mg

---

<div class="post-metadata">

### Author: ![M\_G](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@M\_G](https://discourse.chef.io/u/M_G)
#### Post date: [February 6, 2015, 8:22am UTC](https://discourse.chef.io/t/upgrading-from-chef-11-to-12/6369/10 "2015-02-06T08:22:22Z")

</div>

Hi aj  
Output of chef-shell -z  
chef \> node.debug\_value(:tomcat) =\> [[“set\_unless\_enabled?”, false], [“default”, {“user”=\>“tomcat”, “base”=\>"/opt/apache-tomcat-7.0.54"}], [“env\_default”, :not\_present], [“role\_default”, :not\_present], [“force\_default”, :not\_present], [“normal”, {“base”=\>"/opt/apache-tomcat-7.0.54", “user”=\>“tomcat”}], [“override”, :not\_present], [“role\_override”, :not\_present], [“env\_override”, :not\_present], [“force\_override”, :not\_present], [“automatic”, :not\_present]]chef \> node.debug\_value(:tomcat, :user) =\> [[“set\_unless\_enabled?”, false], [“default”, “tomcat”], [“env\_default”, :not\_present], [“role\_default”, :not\_present], [“force\_default”, :not\_present], [“normal”, “tomcat”], [“override”, :not\_present], [“role\_override”, :not\_present], [“env\_override”, :not\_present], [“force\_override”, :not\_present], [“automatic”, :not\_present]]chef \>

Regards  
mg  
Date: Fri, 6 Feb 2015 21:01:12 +1300  
From: aj@junglistheavy.industries  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: RE: Re: Knife search shows attributes but cannot find same attribute in recipe

oh sorry, `node.debug_value(:tomcat)` or `(:tomcat, :user)`  
cheers,  
–aj  
On Fri, Feb 6, 2015 at 8:57 PM, AJ Christensen [aj@junglistheavy.industries](mailto:aj@junglistheavy.industries) wrote:  
try `node.debug_value(:tc, :user)` in a chef-shell with the attributes loaded or in your Recipe DSL [0]; you should be able to determine the source of your attribute woes. Given that you have not shared with us your attribute structure (cookbooks, roles, environments, json attributes, ohai custom plugins) without additional diagnostics, my recommendations are limited.  
Please provide a full debug log if possible, too! `-ldebug` or similar.

cheers,  
–aj  
[http://jtimberman.housepub.org/blog/2014/09/02/chef-node-dot-debug-value/](http://jtimberman.housepub.org/blog/2014/09/02/chef-node-dot-debug-value/)

On Fri, Feb 6, 2015 at 8:47 PM, M G [meher03@hotmail.com](mailto:meher03@hotmail.com) wrote:

Hi AJ  
OK. I ran the recipe using your suggestion and still the variable tcuser comes up empty when running on the node.  
knife search node name:devwsgw20150130113529 -a tomcat1 items found  
devwsgw20150130113529: tomcat: base: /opt/apache-tomcat-7.0.54 user: tomcat  
As you can see the attribute tomcat has two child attributes base and user with values in them.  
In the recipe, I have the following code:  
tc=node.attribute[:tomcat][:base]log "tc base is #{tc}"tcuser=node[‘tomcat’][‘user’]log "tc user is #{tcuser}"  
And while running it I get

- log[tc base is /opt/apache-tomcat-7.0.54] action write
- log[tc user is] action write  
So you see using the colon notation I am able to get the value of tomcat’s child attribute “base” but using the colon notation and your suggested notation I get nothing. This is strange behavior that I have not encountered .  
Any suggestions/pointers ?  
Regards  
mg  
Date: Fri, 6 Feb 2015 17:45:11 +1300  
From: aj@junglistheavy.industries  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Knife search shows attributes but cannot find same attribute in recipe

````auto
log "tc user is #{tcuser}"```
this is wrong, you want something like:
```tcuser = node['tomcat']['user']```
in your Recipe. I don't know that `node.attribute` does what you mean.
cheers,
--aj
On Fri, Feb 6, 2015 at 5:42 PM, M G <meher03@hotmail.com> wrote:

Hi
When i do 
knife search node name:devwsgw20150130113529 -a tomcat.user1 items found
devwsgw20150130113529: tomcat.user: tomcat
I see there is an attribute called tomcat.user
In recipe I am using,
tcuser=node.attribute[:tomcat][:user]log "tc user is #{tcuser}"

When I run the chef-client on the above node, i see the following line printed
Compiling Cookbooks...Converging 14 resourcesRecipe: update::deploy * log[tc user is] action write
Why can knife search the attribute and the recipe cannot?
Please provide pointers/suggestions.
Regards
mg
````
