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


Chronological Thread 
  • From: "Gibbons, Daniel (RBI-UK)" < >
  • To: " " < >
  • Subject: [chef] RE: Re: Chef-solo override-runlist
  • Date: Thu, 6 Jun 2013 08:05:03 +0000
  • Accept-language: en-GB, en-US

Hi,

 

I get the same result with version 11.4.4:

 

For some reason the –o parameter doesn’t work correctly.

 

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

Starting Chef Client, version 11.4.4←[0m

[2013-06-06T07:42:04+01:00] INFO: *** Chef 11.4.4 ***

[2013-06-06T07:43:06+01:00] DEBUG: Building node object for localhost

[2013-06-06T07:43:06+01:00] DEBUG: Extracting run list from JSON attributes provided on command line

[2013-06-06T07:43:06+01:00] DEBUG: Applying attributes from json file

[2013-06-06T07:43:06+01:00] DEBUG: Platform is windows version 6.1.7601

[2013-06-06T07:43:06+01:00] WARN: Run List override has been provided.

[2013-06-06T07:43:06+01:00] WARN: Original Run List: []

[2013-06-06T07:43:06+01:00] WARN: Overridden Run List: [recipe[roles]]

[2013-06-06T07:43:06+01:00] INFO: Run List is [recipe[roles]]

[2013-06-06T07:43:06+01:00] INFO: Run List expands to [roles]

[2013-06-06T07:43:06+01:00] INFO: Starting Chef Run for QHSW21813.b2b.regn.net

[2013-06-06T07:43:06+01:00] INFO: Running start handlers

[2013-06-06T07:43:06+01:00] INFO: Start handlers complete.

[2013-06-06T07:43:06+01:00] DEBUG: Checking for administrator privileges....

[2013-06-06T07:43:06+01:00] DEBUG: chef-client has administrator privileges on node QHSW21813.b2b.regn.net.

[2013-06-06T07:43:06+01:00] DEBUG: No chefignore file found at C:/Projects/Dev Ops/Chef/cookbooks/chefignore no files wi

ll be ignored

Compiling Cookbooks...←[0m

[2013-06-06T07:43:06+01:00] DEBUG: Re-raising exception: Chef::Exceptions::CookbookNotFound - Cookbook roles not found.

If you're loading roles 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.4.4/lib/chef/cookbook/cookbook_collection.rb:38:in `block in i

nitialize'

 

Is this a bug?

 

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.

§