Run list ordering

Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook from
https://github.com/elasticsearch/cookbook-elasticsearch

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch, elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch, java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run alphabetically? I'm
confused :slight_smile:

run list item are not executed alphabetically, they are executed as per the
order of assignment in the run list. But this order can be changed, as
recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:

Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch, elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch, java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously blows
up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run alphabetically?
I'm
confused :slight_smile:

The "Loading cookbooks" phase is just referring to downloading the cookbooks from the chef server, which I guess it does in alpha order because it makes as much sense as anything else :slight_smile:

--Noah

On Jan 29, 2013, at 5:49 PM, Ranjib Dey wrote:

run list item are not executed alphabetically, they are executed as per the order of assignment in the run list. But this order can be changed, as recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:
Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch, elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch, java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run alphabetically? I'm
confused :slight_smile:

elasticsearch::default includes ark recipe,
as noah already mentioned, loading cookbooks in alphabetically order should
matter, as its only compiles the attributes, etc at this phase

On Tue, Jan 29, 2013 at 5:50 PM, Noah Kantrowitz noah@coderanger.netwrote:

The "Loading cookbooks" phase is just referring to downloading the
cookbooks from the chef server, which I guess it does in alpha order
because it makes as much sense as anything else :slight_smile:

--Noah

On Jan 29, 2013, at 5:49 PM, Ranjib Dey wrote:

run list item are not executed alphabetically, they are executed as per
the order of assignment in the run list. But this order can be changed, as
recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:
Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch, elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch,
java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously
blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run
alphabetically? I'm
confused :slight_smile:

Hmm... so I tried adding 'ark' recipe after xml etc:

run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[ark]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)

still, the first thing that start Processing, is:

INFO: Processing chef_gem[fog] action install (elasticsearch::ebs line 13)

Thanks,
Erling

On Wed, Jan 30, 2013 at 2:53 AM, Ranjib Dey dey.ranjib@gmail.com wrote:

elasticsearch::default includes ark recipe,
as noah already mentioned, loading cookbooks in alphabetically order
should matter, as its only compiles the attributes, etc at this phase

On Tue, Jan 29, 2013 at 5:50 PM, Noah Kantrowitz noah@coderanger.netwrote:

The "Loading cookbooks" phase is just referring to downloading the
cookbooks from the chef server, which I guess it does in alpha order
because it makes as much sense as anything else :slight_smile:

--Noah

On Jan 29, 2013, at 5:49 PM, Ranjib Dey wrote:

run list item are not executed alphabetically, they are executed as per
the order of assignment in the run list. But this order can be changed, as
recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:
Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook
from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch,
elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch,
java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously
blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run
alphabetically? I'm
confused :slight_smile:

chef_gem resources happen at compile time, so effectively before any other cookbook, nothing to worry about.

--Noah

On Jan 29, 2013, at 6:04 PM, Erling Wegger Linde wrote:

Hmm... so I tried adding 'ark' recipe after xml etc:

run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[ark]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)

still, the first thing that start Processing, is:

INFO: Processing chef_gem[fog] action install (elasticsearch::ebs line 13)

Thanks,
Erling

On Wed, Jan 30, 2013 at 2:53 AM, Ranjib Dey dey.ranjib@gmail.com wrote:
elasticsearch::default includes ark recipe,
as noah already mentioned, loading cookbooks in alphabetically order should matter, as its only compiles the attributes, etc at this phase

On Tue, Jan 29, 2013 at 5:50 PM, Noah Kantrowitz noah@coderanger.net wrote:
The "Loading cookbooks" phase is just referring to downloading the cookbooks from the chef server, which I guess it does in alpha order because it makes as much sense as anything else :slight_smile:

--Noah

On Jan 29, 2013, at 5:49 PM, Ranjib Dey wrote:

run list item are not executed alphabetically, they are executed as per the order of assignment in the run list. But this order can be changed, as recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:
Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch, elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch, java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run alphabetically? I'm
confused :slight_smile:

Sorry, found this in the elasticsearch cookbook code now:

NOTE: The chef_gem resource is run before all other recipes,

during node compile phase, so you have to have development packages

and the libxml bindings installed for Nokogiri (a dependency of

Fog).

On Wed, Jan 30, 2013 at 3:04 AM, Erling Wegger Linde erlingwl@gmail.comwrote:

Hmm... so I tried adding 'ark' recipe after xml etc:

run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[ark]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)

still, the first thing that start Processing, is:

INFO: Processing chef_gem[fog] action install (elasticsearch::ebs line 13)

Thanks,
Erling

On Wed, Jan 30, 2013 at 2:53 AM, Ranjib Dey dey.ranjib@gmail.com wrote:

elasticsearch::default includes ark recipe,
as noah already mentioned, loading cookbooks in alphabetically order
should matter, as its only compiles the attributes, etc at this phase

On Tue, Jan 29, 2013 at 5:50 PM, Noah Kantrowitz noah@coderanger.netwrote:

The "Loading cookbooks" phase is just referring to downloading the
cookbooks from the chef server, which I guess it does in alpha order
because it makes as much sense as anything else :slight_smile:

--Noah

On Jan 29, 2013, at 5:49 PM, Ranjib Dey wrote:

run list item are not executed alphabetically, they are executed as
per the order of assignment in the run list. But this order can be changed,
as recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:
Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook
from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch,
elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch,
java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously
blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run
alphabetically? I'm
confused :slight_smile:

coderanger beat me to it.

On Tue, Jan 29, 2013 at 9:05 PM, Noah Kantrowitz noah@coderanger.net wrote:

chef_gem resources happen at compile time, so effectively before any other cookbook, nothing to worry about.

--Noah

On Jan 29, 2013, at 6:04 PM, Erling Wegger Linde wrote:

Hmm... so I tried adding 'ark' recipe after xml etc:

run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[ark]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)

still, the first thing that start Processing, is:

INFO: Processing chef_gem[fog] action install (elasticsearch::ebs line 13)

Thanks,
Erling

On Wed, Jan 30, 2013 at 2:53 AM, Ranjib Dey dey.ranjib@gmail.com wrote:
elasticsearch::default includes ark recipe,
as noah already mentioned, loading cookbooks in alphabetically order should matter, as its only compiles the attributes, etc at this phase

On Tue, Jan 29, 2013 at 5:50 PM, Noah Kantrowitz noah@coderanger.net wrote:
The "Loading cookbooks" phase is just referring to downloading the cookbooks from the chef server, which I guess it does in alpha order because it makes as much sense as anything else :slight_smile:

--Noah

On Jan 29, 2013, at 5:49 PM, Ranjib Dey wrote:

run list item are not executed alphabetically, they are executed as per the order of assignment in the run list. But this order can be changed, as recipes can internally invoke "include_recipe ".
Check the recipes, see if you have any include_recipe

On Tue, Jan 29, 2013 at 5:33 PM, erlingwl@gmail.com wrote:
Hi, I'm a bit confused about the ordering in the runlist.

I'm trying to set up elasticsearch using the elastic search cookbook from
GitHub - sous-chefs/elasticsearch: Development repository for the elasticsearch cookbook

I have a search role looking like this:

name "search"
description "search"
run_list(
"recipe[xml]",
"recipe[java]",
"recipe[monit]",
"recipe[elasticsearch]",
"recipe[elasticsearch::aws]",
"recipe[elasticsearch::ebs]",
"recipe[elasticsearch::data]",
)
default_attributes(
)
override_attributes(
"xml" => {"packages" => ["libxml2", "libxml2-dev", "libxslt-dev"]}
)

From the logs when running the chef-client, I can see:

Run List expands to [xml, java, monit, elasticsearch, elasticsearch::aws,
elasticsearch::ebs, elasticsearch::data]

But then:

Loading cookbooks [ark, build-essential, chef_handler, elasticsearch, java,
monit,
windows, xml]

So for some reason, xml is run after elasticsearch, which obviously blows up,
because it is trying to install nokogiri, which requires libxml2 etc.

Is there a way to override the order? Is it just being run alphabetically? I'm
confused :slight_smile: