# Using kitchen override/stub a cookbook

**URL:** <https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861>\
**Category:** Chef Infra (archive)\
**Created:** [August 6, 2015, 8:50pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861 "2015-08-06T20:50:19Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Warner](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bill_warner/32/973_2.png) [@Bill\_Warner](https://discourse.chef.io/u/Bill_Warner)\
**Post date:** [August 6, 2015, 8:50pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/1 "2015-08-06T20:50:19Z")

</div>

I am trying to setup testing with kitchen and docker, some cookbooks like  
the supermarket “hostname” cookbook are not compatible with docker but they  
are used in my final deployments. I’d like to stub these out just for when  
kitchen docker is used to speed up early testing but not when vagrant or  
doing a berks install.

I thought I’d use groups in my Berksfile, but that would still try to  
upload/install the stub cookbook to my chef server while doing a berks  
install unless i specify a -e docker\_integration, and Berksfile doesn’t  
seem to be processed by erb.

I was unable to find anywhere in the .kitchen.yml file where I could  
override a single cookbook, or a way to have it not process a cookbook.

## –

Bill Warner

---

<div class="post-metadata">

**Author:** ![coderanger](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/coderanger/32/5_2.png) [@coderanger](https://discourse.chef.io/u/coderanger)\
**Post date:** [August 6, 2015, 8:54pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/2 "2015-08-06T20:54:21Z")

</div>

On Aug 6, 2015, at 1:50 PM, Bill Warner [bill.warner@gmail.com](mailto:bill.warner@gmail.com) wrote:

> I am trying to setup testing with kitchen and docker, some cookbooks like the supermarket "hostname" cookbook are not compatible with docker but they are used in my final deployments. I'd like to stub these out just for when kitchen docker is used to speed up early testing but not when vagrant or doing a berks install.
> 
> I thought I'd use groups in my Berksfile, but that would still try to upload/install the stub cookbook to my chef server while doing a berks install unless i specify a -e docker\_integration, and Berksfile doesn't seem to be processed by erb.
> 
> I was unable to find anywhere in the .kitchen.yml file where I could override a single cookbook, or a way to have it not process a cookbook.

Use a wrapper cookbook that only include\_recipe-s the real one if you aren't on Docker.

--Noah

---

<div class="post-metadata">

**Author:** ![Yauhen\_Artsiukhou](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/yauhen_artsiukhou/32/112_2.png) [@Yauhen\_Artsiukhou](https://discourse.chef.io/u/Yauhen_Artsiukhou)\
**Post date:** [August 7, 2015, 12:44pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/3 "2015-08-07T12:44:16Z")

</div>

+1 Noah  
Using wrapper for test always is really good idea. Here is example

> **[GitHub - jsirex/collectd-lib-cookbook: Chef Cookbook for Collectd](https://github.com/jsirex/collectd-lib-cookbook)**
>
> Chef Cookbook for Collectd. Contribute to jsirex/collectd-lib-cookbook development by creating an account on GitHub.

I'm using noe template tool for creating cookbook skeletons, which are by  
default use wrapper cookbook: [GitHub - jsirex/chef-cookbook.noe: Noe skeleton for Chef Cookbook](https://github.com/jsirex/chef-cookbook.noe)

2015-08-06 23:54 GMT+03:00 Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net):

> On Aug 6, 2015, at 1:50 PM, Bill Warner [bill.warner@gmail.com](mailto:bill.warner@gmail.com) wrote:
> 
> > I am trying to setup testing with kitchen and docker, some cookbooks  
> > like the supermarket "hostname" cookbook are not compatible with docker but  
> > they are used in my final deployments. I'd like to stub these out just for  
> > when kitchen docker is used to speed up early testing but not when vagrant  
> > or doing a berks install.
> > 
> > I thought I'd use groups in my Berksfile, but that would still try to  
> > upload/install the stub cookbook to my chef server while doing a berks  
> > install unless i specify a -e docker\_integration, and Berksfile doesn't  
> > seem to be processed by erb.
> > 
> > I was unable to find anywhere in the .kitchen.yml file where I could  
> > override a single cookbook, or a way to have it not process a cookbook.
> 
> Use a wrapper cookbook that only include\_recipe-s the real one if you  
> aren't on Docker.
> 
> --Noah

---

<div class="post-metadata">

**Author:** ![Bill\_Warner](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bill_warner/32/973_2.png) [@Bill\_Warner](https://discourse.chef.io/u/Bill_Warner)\
**Post date:** [August 7, 2015, 3:55pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/4 "2015-08-07T15:55:37Z")

</div>

It's actually a wrapper cookbook that I'm testing. the cookbook includes  
my base cookbook for internal standards configuration which has a few  
community cookbooks as well as a few in house ones to get the base configs,  
users, monitoring, dns, host etc all set up. then it includes some  
community and in house cookbooks to personalize the target application such  
as kafka, cassandra or our in house apps.

I have all the tests running with Vagrant now but due to some minor  
incompatibilities with docker (mainly not being able to write to /etc/hosts  
or /etc/resolv.conf, some of the cookbooks in the runlist always fail. if  
there was a way I could blacklist or stub those cookbooks I'd still be able  
to get a nearly full test much faster than I can currently with Vagrant.

I may be able to do a custom rake task that would rewrite the Berksfile and  
point to empty cookbooks for those...not sure how else to test it.

On Fri, Aug 7, 2015 at 5:44 AM, Yauhen Artsiukhou [jsirex@gmail.com](mailto:jsirex@gmail.com) wrote:

> +1 Noah  
> Using wrapper for test always is really good idea. Here is example  
> [GitHub - jsirex/collectd-lib-cookbook: Chef Cookbook for Collectd](https://github.com/jsirex/collectd-lib-cookbook)
> 
> I'm using noe template tool for creating cookbook skeletons, which are by  
> default use wrapper cookbook: [GitHub - jsirex/chef-cookbook.noe: Noe skeleton for Chef Cookbook](https://github.com/jsirex/chef-cookbook.noe)
> 
> 2015-08-06 23:54 GMT+03:00 Noah Kantrowitz [noah@coderanger.net](mailto:noah@coderanger.net):
> 
> > On Aug 6, 2015, at 1:50 PM, Bill Warner [bill.warner@gmail.com](mailto:bill.warner@gmail.com) wrote:
> > 
> > > I am trying to setup testing with kitchen and docker, some cookbooks  
> > > like the supermarket "hostname" cookbook are not compatible with docker but  
> > > they are used in my final deployments. I'd like to stub these out just for  
> > > when kitchen docker is used to speed up early testing but not when vagrant  
> > > or doing a berks install.
> > > 
> > > I thought I'd use groups in my Berksfile, but that would still try to  
> > > upload/install the stub cookbook to my chef server while doing a berks  
> > > install unless i specify a -e docker\_integration, and Berksfile doesn't  
> > > seem to be processed by erb.
> > > 
> > > I was unable to find anywhere in the .kitchen.yml file where I could  
> > > override a single cookbook, or a way to have it not process a cookbook.
> > 
> > Use a wrapper cookbook that only include\_recipe-s the real one if you  
> > aren't on Docker.
> > 
> > --Noah

## --

Bill Warner

---

<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:** [August 7, 2015, 4:11pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/5 "2015-08-07T16:11:53Z")

</div>

On Friday, August 7, 2015 at 8:55 AM, Bill Warner wrote:

> It's actually a wrapper cookbook that I'm testing. the cookbook includes my base cookbook for internal standards configuration which has a few community cookbooks as well as a few in house ones to get the base configs, users, monitoring, dns, host etc all set up. then it includes some community and in house cookbooks to personalize the target application such as kafka, cassandra or our in house apps.
> 
> I have all the tests running with Vagrant now but due to some minor incompatibilities with docker (mainly not being able to write to /etc/hosts or /etc/resolv.conf, some of the cookbooks in the runlist always fail. if there was a way I could blacklist or stub those cookbooks I'd still be able to get a nearly full test much faster than I can currently with Vagrant.
> 
> I may be able to do a custom rake task that would rewrite the Berksfile and point to empty cookbooks for those...not sure how else to test it.  
> You can detect that you’re on Docker with ohai (you’ll have to poke around for these attributes, I don’t recall what they are off-hand) and then put the logic into your wrapper cookbook. You could also do this via attributes. It’s maybe a tiny bit ugly to have that logic in non-test code, but you lose the ability to manage the run\_list when you go to role cookbooks, so it’s your best option.

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Bill\_Warner](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/bill_warner/32/973_2.png) [@Bill\_Warner](https://discourse.chef.io/u/Bill_Warner)\
**Post date:** [August 7, 2015, 9:49pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/6 "2015-08-07T21:49:50Z")

</div>

that's not a bad idea at all, and if we ever move to more docker related  
stuff this would likely be necessary anyway so not just test code.

Looks like the ohai related node items:  
node['virtualization']['system'] = 'docker'  
node[virtualization']['systems']['docker'] = 'guest'

I'll give this a try.

-Bill

On Fri, Aug 7, 2015 at 9:11 AM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:

> On Friday, August 7, 2015 at 8:55 AM, Bill Warner wrote:
> 
> > It's actually a wrapper cookbook that I'm testing. the cookbook includes  
> > my base cookbook for internal standards configuration which has a few  
> > community cookbooks as well as a few in house ones to get the base configs,  
> > users, monitoring, dns, host etc all set up. then it includes some  
> > community and in house cookbooks to personalize the target application such  
> > as kafka, cassandra or our in house apps.
> > 
> > I have all the tests running with Vagrant now but due to some minor  
> > incompatibilities with docker (mainly not being able to write to /etc/hosts  
> > or /etc/resolv.conf, some of the cookbooks in the runlist always fail. if  
> > there was a way I could blacklist or stub those cookbooks I'd still be able  
> > to get a nearly full test much faster than I can currently with Vagrant.
> > 
> > I may be able to do a custom rake task that would rewrite the Berksfile  
> > and point to empty cookbooks for those...not sure how else to test it.  
> > You can detect that you’re on Docker with ohai (you’ll have to poke around  
> > for these attributes, I don’t recall what they are off-hand) and then put  
> > the logic into your wrapper cookbook. You could also do this via  
> > attributes. It’s maybe a tiny bit ugly to have that logic in non-test code,  
> > but you lose the ability to manage the run\_list when you go to role  
> > cookbooks, so it’s your best option.
> 
> --  
> Daniel DeLeo

## --

Bill Warner

---

<div class="post-metadata">

**Author:** ![Damien\_Roche](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/damien_roche/32/75_2.png) [@Damien\_Roche](https://discourse.chef.io/u/Damien_Roche)\
**Post date:** [August 7, 2015, 10:43pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/7 "2015-08-07T22:43:13Z")

</div>

Putting the container in privileged mode you can copy to a temp location  
unmount and replace the hosts file and resolv.conf etc..

This will allow the other cookbooks function as expected.

You can encapsulate this fix within a cookbook for use in your suites.

Using berks groups include exclude it during as needed.  
On 7 Aug 2015 22:50, "Bill Warner" [bill.warner@gmail.com](mailto:bill.warner@gmail.com) wrote:

> that's not a bad idea at all, and if we ever move to more docker related  
> stuff this would likely be necessary anyway so not just test code.
> 
> Looks like the ohai related node items:  
> node['virtualization']['system'] = 'docker'  
> node[virtualization']['systems']['docker'] = 'guest'
> 
> I'll give this a try.
> 
> -Bill
> 
> On Fri, Aug 7, 2015 at 9:11 AM, Daniel DeLeo [dan@kallistec.com](mailto:dan@kallistec.com) wrote:
> 
> > On Friday, August 7, 2015 at 8:55 AM, Bill Warner wrote:
> > 
> > > It's actually a wrapper cookbook that I'm testing. the cookbook  
> > > includes my base cookbook for internal standards configuration which has a  
> > > few community cookbooks as well as a few in house ones to get the base  
> > > configs, users, monitoring, dns, host etc all set up. then it includes some  
> > > community and in house cookbooks to personalize the target application such  
> > > as kafka, cassandra or our in house apps.
> > > 
> > > I have all the tests running with Vagrant now but due to some minor  
> > > incompatibilities with docker (mainly not being able to write to /etc/hosts  
> > > or /etc/resolv.conf, some of the cookbooks in the runlist always fail. if  
> > > there was a way I could blacklist or stub those cookbooks I'd still be able  
> > > to get a nearly full test much faster than I can currently with Vagrant.
> > > 
> > > I may be able to do a custom rake task that would rewrite the Berksfile  
> > > and point to empty cookbooks for those...not sure how else to test it.  
> > > You can detect that you’re on Docker with ohai (you’ll have to poke  
> > > around for these attributes, I don’t recall what they are off-hand) and  
> > > then put the logic into your wrapper cookbook. You could also do this via  
> > > attributes. It’s maybe a tiny bit ugly to have that logic in non-test code,  
> > > but you lose the ability to manage the run\_list when you go to role  
> > > cookbooks, so it’s your best option.
> > 
> > --  
> > Daniel DeLeo
> 
> ## --
> 
> Bill Warner

---

<div class="post-metadata">

**Author:** ![Jubal\_Kohlmeier](https://avatars.discourse-cdn.com/v4/letter/j/7ab992/32.png) [@Jubal\_Kohlmeier](https://discourse.chef.io/u/Jubal_Kohlmeier)\
**Post date:** [August 10, 2015, 4:54am UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/8 "2015-08-10T04:54:05Z")

</div>

Hello,

I am new to chef, and have gone the effort to port a few cookbook recipes  
to the AIX operating system. In one of my recipes, i update kernel  
parameters. However, on AIX, the parameters  
require a reboot of the OS for them to come into effect. Does CHEF have  
multi-boot support? I suspect not. Ive found recipe’s for shutting down  
the os, but nothing for support the  
chef kitchen for ‘waiting for the os to come back up’ and continue  
installation.

Do i have it correctly?

Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com)  
503-747-1333 503-502-7733 cell  
IT Specialist Oracle Applications Benchmark

---

<div class="post-metadata">

**Author:** ![jtimberman](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jtimberman/32/8_2.png) [@jtimberman](https://discourse.chef.io/u/jtimberman)\
**Post date:** [August 10, 2015, 1:55pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/9 "2015-08-10T13:55:40Z")

</div>

You are correct in that Chef doesn't have a "resume after reboot" option.  
However, Chef is both idempotent and convergent. Rerunning chef after  
reboot will result in NOT configuring the system resources that are in the  
state declared by the recipes. For example, if your recipes manage a config  
file and install a package, those won't change when chef reruns. However if  
the reboot made a change to a file chef manages then it will be updated by  
chef after the reboot.

Make sense?

Cheers,  
Joshua

On Sunday, August 9, 2015, Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com) wrote:

> Hello,
> 
> I am new to chef, and have gone the effort to port a few cookbook recipes  
> to the AIX operating system. In one of my recipes, i update kernel  
> parameters. However, on AIX, the parameters  
> require a reboot of the OS for them to come into effect. Does CHEF have  
> multi-boot support? I suspect not. Ive found recipe's for shutting down the  
> os, but nothing for support the  
> chef kitchen for 'waiting for the os to come back up' and continue  
> installation.
> 
> Do i have it correctly?
> 
> Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com)  
> \<javascript:\_e(%7B%7D,'cvml','jubal@us.ibm.com');\>  
> 503-747-1333 503-502-7733 cell  
> IT Specialist Oracle Applications Benchmark

---

<div class="post-metadata">

**Author:** ![Chris\_F](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Chris\_F](https://discourse.chef.io/u/Chris_F)\
**Post date:** [August 12, 2015, 7:48pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/10 "2015-08-12T19:48:48Z")

</div>

Is the reboot resource idempotent? To extend Joshua’s answer one can run chef-client as a daemon on a node and run this recipe.

# Put resources that need to converge before a reboot here

resource1 “Some resource”  
resource2 “Some resource”

# Reboot the machine

reboot “Need to reboot for kernel changes to take effect”

# Put resources that need to converge after a reboot here

Resource3 “Some resource”  
Resource4 “Some resource”  
What will this recipe do after the reboot? I know it will not converge resource1 and resource2, but will it converge the reboot resource? You can put guards against it but just wondering what the vanilla behavior will be.

Chris

From: Joshua Timberman [[mailto:joshua@chef.io](mailto:joshua@chef.io)]  
Sent: Monday, August 10, 2015 9:56 AM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Does Chef have support for multi-boot install

You are correct in that Chef doesn’t have a “resume after reboot” option. However, Chef is both idempotent and convergent. Rerunning chef after reboot will result in NOT configuring the system resources that are in the state declared by the recipes. For example, if your recipes manage a config file and install a package, those won’t change when chef reruns. However if the reboot made a change to a file chef manages then it will be updated by chef after the reboot.

Make sense?

Cheers,  
Joshua

On Sunday, August 9, 2015, Jubal Kohlmeier \<[jubal@us.ibm.com](mailto:jubal@us.ibm.com)[mailto:jubal@us.ibm.com](mailto:jubal@us.ibm.com)\> wrote:  
Hello,

I am new to chef, and have gone the effort to port a few cookbook recipes to the AIX operating system. In one of my recipes, i update kernel parameters. However, on AIX, the parameters  
require a reboot of the OS for them to come into effect. Does CHEF have multi-boot support? I suspect not. Ive found recipe’s for shutting down the os, but nothing for support the  
chef kitchen for ‘waiting for the os to come back up’ and continue installation.

Do i have it correctly?

Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com)\<javascript:\_e(%7B%7D,‘cvml’,‘jubal@us.ibm.com’);\>  
503-747-1333 503-502-7733 cell  
IT Specialist Oracle Applications Benchmark

---

<div class="post-metadata">

**Author:** ![nathwill](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/nathwill/32/25_2.png) [@nathwill](https://discourse.chef.io/u/nathwill)\
**Post date:** [August 12, 2015, 8:00pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/11 "2015-08-12T20:00:56Z")

</div>

you'd want to have the reboot resource have a default "action :nothing",  
and then have the resources that require a reboot notify the reboot  
resource to run. the concept of idempotency doesn't really apply to an  
"action", which is why execute resources aren't inherently idempotent  
(though the result may be).

On Wed, Aug 12, 2015 at 12:49 PM Fouts, Chris [Chris.Fouts@sensus.com](mailto:Chris.Fouts@sensus.com)  
wrote:

> Is the reboot resource idempotent? To extend Joshua’s answer one can run  
> chef-client as a daemon on a node and run this recipe.
> 
> # Put resources that need to converge before a reboot here
> 
> resource1 “Some resource”
> 
> resource2 “Some resource”
> 
> # Reboot the machine
> 
> reboot “Need to reboot for kernel changes to take effect”
> 
> # Put resources that need to converge after a reboot here
> 
> Resource3 “Some resource”
> 
> Resource4 “Some resource”
> 
> What will this recipe do after the reboot? I know it will not converge  
> resource1 and resource2, but will it converge the reboot resource? You can  
> put guards against it but just wondering what the vanilla behavior will be.
> 
> Chris
> 
> _From:_ Joshua Timberman [[mailto:joshua@chef.io](mailto:joshua@chef.io)]  
> _Sent:_ Monday, August 10, 2015 9:56 AM  
> _To:_ [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
> _Subject:_ [chef] Re: Does Chef have support for multi-boot install
> 
> You are correct in that Chef doesn't have a "resume after reboot" option.  
> However, Chef is both idempotent and convergent. Rerunning chef after  
> reboot will result in NOT configuring the system resources that are in the  
> state declared by the recipes. For example, if your recipes manage a config  
> file and install a package, those won't change when chef reruns. However if  
> the reboot made a change to a file chef manages then it will be updated by  
> chef after the reboot.
> 
> Make sense?
> 
> Cheers,
> 
> Joshua
> 
> On Sunday, August 9, 2015, Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com) wrote:
> 
> Hello,
> 
> I am new to chef, and have gone the effort to port a few cookbook recipes  
> to the AIX operating system. In one of my recipes, i update kernel  
> parameters. However, on AIX, the parameters  
> require a reboot of the OS for them to come into effect. Does CHEF have  
> multi-boot support? I suspect not. Ive found recipe's for shutting down the  
> os, but nothing for support the  
> chef kitchen for 'waiting for the os to come back up' and continue  
> installation.
> 
> Do i have it correctly?
> 
> Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com)  
> 503-747-1333 503-502-7733 cell  
> IT Specialist Oracle Applications Benchmark

---

<div class="post-metadata">

**Author:** ![Chris\_F](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@Chris\_F](https://discourse.chef.io/u/Chris_F)\
**Post date:** [August 13, 2015, 2:11pm UTC](https://discourse.chef.io/t/using-kitchen-override-stub-a-cookbook/6861/12 "2015-08-13T14:11:20Z")

</div>

That makes a lot of sense!

Chris

From: Nathan Williams [[mailto:nath.e.will@gmail.com](mailto:nath.e.will@gmail.com)]  
Sent: Wednesday, August 12, 2015 4:01 PM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: RE: Re: Does Chef have support for multi-boot install

you’d want to have the reboot resource have a default “action :nothing”, and then have the resources that require a reboot notify the reboot resource to run. the concept of idempotency doesn’t really apply to an “action”, which is why execute resources aren’t inherently idempotent (though the result may be).

On Wed, Aug 12, 2015 at 12:49 PM Fouts, Chris \<[Chris.Fouts@sensus.com](mailto:Chris.Fouts@sensus.com)[mailto:Chris.Fouts@sensus.com](mailto:Chris.Fouts@sensus.com)\> wrote:  
Is the reboot resource idempotent? To extend Joshua’s answer one can run chef-client as a daemon on a node and run this recipe.

# Put resources that need to converge before a reboot here

resource1 “Some resource”  
resource2 “Some resource”

# Reboot the machine

reboot “Need to reboot for kernel changes to take effect”

# Put resources that need to converge after a reboot here

Resource3 “Some resource”  
Resource4 “Some resource”  
What will this recipe do after the reboot? I know it will not converge resource1 and resource2, but will it converge the reboot resource? You can put guards against it but just wondering what the vanilla behavior will be.

Chris

From: Joshua Timberman [[mailto:joshua@chef.io](mailto:joshua@chef.io)[mailto:joshua@chef.io](mailto:joshua@chef.io)]  
Sent: Monday, August 10, 2015 9:56 AM  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)[mailto:chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Does Chef have support for multi-boot install

You are correct in that Chef doesn’t have a “resume after reboot” option. However, Chef is both idempotent and convergent. Rerunning chef after reboot will result in NOT configuring the system resources that are in the state declared by the recipes. For example, if your recipes manage a config file and install a package, those won’t change when chef reruns. However if the reboot made a change to a file chef manages then it will be updated by chef after the reboot.

Make sense?

Cheers,  
Joshua

On Sunday, August 9, 2015, Jubal Kohlmeier \<[jubal@us.ibm.com](mailto:jubal@us.ibm.com)[mailto:jubal@us.ibm.com](mailto:jubal@us.ibm.com)\> wrote:  
Hello,

I am new to chef, and have gone the effort to port a few cookbook recipes to the AIX operating system. In one of my recipes, i update kernel parameters. However, on AIX, the parameters  
require a reboot of the OS for them to come into effect. Does CHEF have multi-boot support? I suspect not. Ive found recipe’s for shutting down the os, but nothing for support the  
chef kitchen for ‘waiting for the os to come back up’ and continue installation.

Do i have it correctly?

Jubal Kohlmeier [jubal@us.ibm.com](mailto:jubal@us.ibm.com)[mailto:jubal@us.ibm.com](mailto:jubal@us.ibm.com)  
503-747-1333 503-502-7733 cell  
IT Specialist Oracle Applications Benchmark
