[chef] RE: Re: Chef-solo override-runlist


Chronological Thread 
  • From: "Gibbons, Daniel (RBI-UK)" < >
  • To: " " < >
  • Subject: [chef] RE: Re: Chef-solo override-runlist
  • Date: Tue, 4 Jun 2013 16:58:36 +0000
  • Accept-language: en-GB, en-US

Hi,

 

This is the full output:

 

C:\Projects\Dev Ops\Chef>chef-solo -c solo.rb -o "role[base]" -j productionSettings.json  -ldebug

Starting Chef Client, version 11.0.0←[0m

[2013-06-04T17:53:04+01:00] INFO: *** Chef 11.0.0 ***

[2013-06-04T17:53:17+01:00] DEBUG: Building node object for QHSW21813.b2b.regn.net

[2013-06-04T17:53:17+01:00] DEBUG: Extracting run list from JSON attributes provided on command line

[2013-06-04T17:53:17+01:00] INFO: Setting the run_list to ["role[marklogic]"] from JSON

[2013-06-04T17:53:17+01:00] DEBUG: Applying attributes from json file

[2013-06-04T17:53:17+01:00] DEBUG: Platform is windows version 6.1.7601

[2013-06-04T17:53:17+01:00] WARN: Run List override has been provided.

[2013-06-04T17:53:17+01:00] WARN: Original Run List: [role[marklogic]]

[2013-06-04T17:53:17+01:00] WARN: Overridden Run List: [recipe[roles]]

[2013-06-04T17:53:17+01:00] INFO: Run List is [recipe[roles]]

[2013-06-04T17:53:17+01:00] INFO: Run List expands to [roles]

[2013-06-04T17:53:17+01:00] INFO: Starting Chef Run for QHSW21813.b2b.regn.net

[2013-06-04T17:53:17+01:00] INFO: Running start handlers

[2013-06-04T17:53:17+01:00] INFO: Start handlers complete.

[2013-06-04T17:53:17+01:00] DEBUG: Checking for administrator privileges....

[2013-06-04T17:53:17+01:00] DEBUG: chef-client has administrator privileges on node QHSW21813.b2b.regn.net.

[2013-06-04T17:53:17+01:00] DEBUG: No chefignore file found at C:/Projects/Dev Ops/Chef/cookbooks/chefignore no files will be ignored

Compiling Cookbooks...←[0m

[2013-06-04T17:53:17+01:00] DEBUG: Re-raising exception: Chef::Exceptions::CookbookNotFound - Cookbook roles not found. If you're loading ro

les from another cookbook, make sure you configure the dependency in your metadata

C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/cookbook/cookbook_collection.rb:38:in `block in initialize'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.16.0/lib/ohai/mash.rb:77:in `yield'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.16.0/lib/ohai/mash.rb:77:in `default'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/ohai-6.16.0/lib/ohai/mash.rb:77:in `default'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:265:in `[]'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:265:in `each_cookbook_dep'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:243:in `add_cookbook_with_deps'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:87:in `block in cookbook_order'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:85:in `each'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:85:in `cookbook_order'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:97:in `compile_libraries'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context/cookbook_compiler.rb:70:in `compile'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/run_context.rb:86:in `load'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/client.rb:224:in `setup_run_context'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/client.rb:467:in `do_run'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/client.rb:200:in `run'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/application.rb:190:in `run_chef_client'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/application/solo.rb:239:in `block in run_application'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/application/solo.rb:231:in `loop'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/application/solo.rb:231:in `run_application'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/lib/chef/application.rb:73:in `run'

  C:/opscode/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.0.0/bin/chef-solo:25:in `<top (required)>'

  C:/opscode/chef/bin/chef-solo:23:in `load'

  C:/opscode/chef/bin/chef-solo:23:in `<main>'

 

 

I notice you’ve got a newer version of chef client, maybe it’s been fixed in a later version?  I’ll give it a go….

 

Thanks

 

Dan

 

 

From: Daniel DeLeo [mailto: On Behalf Of Daniel DeLeo
Sent: 04 June 2013 17:45
To:
Subject: [chef] Re: Chef-solo override-runlist

 

 

On Tuesday, June 4, 2013 at 9:20 AM, Gibbons, Daniel (RBI-UK) wrote:

Hi,

 

I'm trying to pass an override list into chef-solo but I can't seem to make it accept a role for example this works:

 

chef-solo -c solo.rb -o "webserver"

Results in:

 

[2013-06-04T17:15:48+01:00] WARN: Original Run List: [role[marklogic]]

[2013-06-04T17:15:48+01:00] WARN: Overridden Run List: [recipe[webserver]]

 

But something like:

 

chef-solo -c solo.rb -o "role[base]"

results in:

 

[2013-06-04T17:18:27+01:00] WARN: Original Run List: [role[marklogic]]

[2013-06-04T17:18:27+01:00] WARN: Overridden Run List: [recipe[roles]]

 

Any ideas how I can pass in a role to the override list in chef-solo?

 

Thanks

 

Dan

This looks like a legit bug, but I cannot reproduce it easily. 

 

```

chef-solo -o "role[foo]"

Starting Chef Client, version 11.4.2

[2013-06-04T09:37:26-07:00] WARN: Run List override has been provided.

[2013-06-04T09:37:26-07:00] WARN: Original Run List: []

[2013-06-04T09:37:26-07:00] WARN: Overridden Run List: [role[foo]]

[2013-06-04T09:37:26-07:00] ERROR: Role foo (included by 'top level') is in the runlist but does not exist. Skipping expand.

 

================================================================================

Error expanding the run_list:

================================================================================

 

 

Missing Role(s) in Run List:

----------------------------

* foo included by 'top level'

 

 

Original Run List

-----------------

* role[foo]

```

 

What version of Chef do you have? Can you run with -ldebug and provide relevant output?

 

 

-- 

Daniel DeLeo

 

===================== DISCLAIMER ======================
This message is intended only for the use of the person(s)
("Intended Recipient") to whom it is addressed. It may contain
information which is privileged and confidential. Accordingly
any dissemination, distribution, copying or other use of this
message or any of its content by any person other than the Intended
Recipient may constitute a breach of civil or criminal law and is
strictly prohibited. If you are not the Intended Recipient, please
contact the sender as soon as possible.

Reed Business Information Limited.
Registered Office: Quadrant House, The Quadrant, Sutton, Surrey, SM2 5AS, UK.
Registered in England under Company No. 151537

=======================================================




Archive powered by MHonArc 2.6.16.

§