BrĂ¡ulio Bhavamitra | 29 Jul 13:39 2014

Generate from metadata.rb attribute list

Hello all,

Is is possible to generate the attribute table help from the metadata.rb attribute list?


"Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua ideologia. Morra por sua ideologia" P.R. Sarkar

EITA - Educação, Informação e Tecnologias para Autogestão

"Paramapurusha é meu pai e Parama Prakriti é minha mãe. O universo é meu lar e todos nós somos cidadãos deste cosmo. Este universo é a imaginação da Mente Macrocósmica, e todas as entidades estão sendo criadas, preservadas e destruídas nas fases de extroversão e introversão do fluxo imaginativo cósmico. No âmbito pessoal, quando uma pessoa imagina algo em sua mente, naquele momento, essa pessoa é a única proprietária daquilo que ela imagina, e ninguém mais. Quando um ser humano criado mentalmente caminha por um milharal também imaginado, a pessoa imaginada não é a propriedade desse milharal, pois ele pertence ao indivíduo que o está imaginando. Este universo foi criado na imaginação de Brahma, a Entidade Suprema, por isso a propriedade deste universo é de Brahma, e não dos microcosmos que também foram criados pela imaginação de Brahma. Nenhuma propriedade deste mundo, mutável ou imutável, pertence a um indivíduo em particular; tudo é o patrimônio comum de todos."
Restante do texto em | 29 Jul 08:13 2014

Search in Chef 11


We are trying to run a little complex search query in one of our recipes which looks something like:

search(:node, "my_attribute:test AND (roles:first_role OR roles:second_role OR roles:third_role OR roles:fourth_role)")

The idea being to retrieve all nodes which have a particular attribute set and has one of the given roles on its runlist. Is the above query the best way to write that? The problem is this used to work fine with Chef 10 but has started failing with Chef 11.

Any help will be greatly appreciated.


Liam Kirsher | 29 Jul 08:02 2014

uWSGI and Django -- missing settings


I'm switching from gunicorn to uWSGI on a Django project.

I'm using the uwsgi cookbook.  It seems to be missing some attributes that are required for running Django, according to the Django and the uWSGI site documentation.

The Django-specific options here are:

  • chdir: The path to the directory that needs to be on Python’s import path – i.e., the directory containing the mysite package.
  • module: The WSGI module to use – probably the mysite.wsgi module that startproject creates.
  • env: Should probably contain at least DJANGO_SETTINGS_MODULE.
  • home: Optional path to your project virtualenv.
But those are not here in the cookbook:
... with the exception of home_path.

What am I missing here? Surely people are using the uwsgi cookbook with Django!
(On the other hand, I was sort of expecting to find an a uswsgi resource in the application_python cookbook, but it doesn't exist.)

How are people doing it?


-- Liam Kirsher PGP:
Chen Wang | 28 Jul 20:36 2014

Different deployment behaviors based on different commits to the source codes using Chef

Hi there,

We are using Chef to deploy our servers to production environment. Right now we are trying to make the CD pipeline have different deployment behaviors based on different kinds of commits to the source codes.  For example, for some changes we want to release right away and for others we want to wait and release at some specific time windows. Another example is that some changes may require all the servers in the same cluster are turned off before we can start the deployment and other changes may not require this.

Just want to see if there is any recommended way to handle this kind of multi-situation deployment using Chef.


anasofia1072 | 28 Jul 15:47 2014

Error file size


does anyone know how to resolve this problem:

RUNING: knife cookbook upload -a 

 413 "Request Entity Too Large"

ERROR: Request Entity Too Large
Response: <html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>

i'm trying to upload a 350mb rpm file.

Indra k | 28 Jul 07:59 2014

Re: Re: Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation

From: Indra k <indra.k <at>>
To: Aditya Karanjkar <aditya.karanjkar <at>>
Sent: Saturday, 19 July 2014 2:25 PM
Subject: Re: [chef] Re: Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation

Hi all,

           Anybody ve idea in this, still now am getting a same error access denied am struggling in this.I ve tried in all ways,also created again in a fresh windows server but still it exists ,also i ve receive a same error when iam try to run winrm configuration and other winrm commands from workstation receive same error "Access denied"



From: Indra k <indra.k <at>>
To: Aditya Karanjkar <aditya.karanjkar <at>>
Sent: Thursday, 10 July 2014 10:30 AM
Subject: Re: [chef] Re: Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation


                 I ve tried that in target machine command prompt itself,it gets run successfully withou error but didnt get install anything.Also it didnt create any log file in WINDOWS LOG installer path.
                In status it shows     "COULDNOT START".
C:\Users\Administrator.WIN-DQ00DBBP3I1>schtasks /Query /tn Install_SQL /v /fo li
Folder: \
HostName:                             WIN-DQ00DBBP3I1
TaskName:                             \Install_SQL
Next Run Time:                        N/A
Status:                               Could not start
Logon Mode:                           Interactive only
Last Run Time:                        09-07-2014 12:11:35
Last Result:                          -2147024894
Author:                               Administrator
Task To Run:                          C:\Program Files\SQL SERVER 2008 R2\setup.
Start In:                             N/A
Comment:                              N/A
Scheduled Task State:                 Enabled
Idle Time:                            Disabled
Power Management:                     Stop On Battery Mode, No Start On Batterie
Run As User:                          WIN-DQ00DBBP3I1\Administrator
Delete Task If Not Rescheduled:       Enabled
Stop Task If Runs X Hours and X Mins: 72:00:00
Schedule:                             Scheduling data is not available in this f
Schedule Type:                        One Time Only
Start Time:                           12:11:00
Start Date:                           09-07-2014
End Date:                             N/A
Days:                                 N/A
Months:                               N/A
Repeat: Every:                        Disabled
Repeat: Until: Time:                  Disabled
Repeat: Until: Duration:              Disabled
Repeat: Stop If Still Running:        Disabled
C:\Users\Administrator.WIN-DQ00DBBP3I1>schtasks /run /i /tn Install_SQL
SUCCESS: Attempted to run the scheduled task "Install_SQL".


From: Aditya Karanjkar <aditya.karanjkar <at>>
To: Indra k <indra.k <at>>
Cc: "chef <at>" <chef <at>>
Sent: Wednesday, 9 July 2014 11:45 PM
Subject: Re: [chef] Re: Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation

Hi Indra,

If the task has been created correctly, it should install SQL Server. Try the following:
1. Use schtasks to check if the task is created correctly for the installation.
> schtasks /query /tn Install_SQL /v /fo list
2. Run the task manually from the command prompt and check if it installs SQL.
> schtasks /run /i /tn Install_SQL
3. If the above two things are fine, the installer should leave a log file behind. Check it to see if the error is still access denied.


On Tue, Jul 8, 2014 at 11:45 PM, Indra k <indra.k <at>> wrote:
Hi Aditiya,
    I have run a following code for sql as you mentioned,it runs successfully .But sql server silent installation doesnot installed in a target machine .It doesnot shows error So what shall i do next?

     execute "Task to install Sql Client" do
        command "schtasks /create /f /sc once /st #{('%H:%M')} /tn Install_SQL /tr \"#{node['sqlstd']['path']} #{node['sqlstd']['installer_options']}\" /RU #{node['sqlstd']['sch_user']} /RP #{node['sqlstd']['sch_passwd']}"
        action :run
execute "Run SQL  installer task" do
        command "schtasks /run /i /tn Install_SQL"
        action :run


2014-07-09T12:11:33+05:30] INFO: Loading cookbooks [windows <at> 1.12.4, powershell <at> 1.1.2, chef_handler <at> 1.1.4, sqlstd <at> 0.1.0] [2014-07-09T12:11:34+05:30] INFO: Storing updated cookbooks/sqlstd/recipes/default.rb in the cache. [2014-07-09T12:11:34+05:30] INFO: Powershell light-weight provider already initialized -- overriding! [2014-07-09T12:11:34+05:30] INFO: WindowsPackage light-weight resource already initialized -- overriding! QS /IACCEPTSQLSERVERLICENSE TERMS=TRUE /ACTION=Install /PID="DDT3B-8W62X-P9JD6-8MX7M-HWK38" /SECURITYMODE=SQ L  /ROLE="AllFeatures_WithDefaults" /INSTANCENAME="MSSQLSERVER" /AGTSVCACCOUNT=" NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE="Automatic" /RSSVCACCOUNT="NT A UTHORITY\NETWORK SERVICE" /ISSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ISSVCSTA RTUPTYPE="Automatic" /ASSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ASSVCSTARTUPT YPE="Automatic" /ASSYSADMINACCOUNTS="WIN-DQ00DBBP3I1\Administrator" /SAPWD="Welc 0me" [2014-07-09T12:11:34+05:30] INFO: Processing execute[Task to install Sql Client] action run (sqlstd::default line 80) [2014-07-09T12:11:34+05:30] INFO: execute[Task to install Sql Client] ran successfully [2014-07-09T12:11:34+05:30] INFO: Processing execute[Run SQL  installer task] action run (sqlstd::default line 84) [2014-07-09T12:11:34+05:30] INFO: execute[Run SQL  installer task] ran successfully [2014-07-09T12:11:34+05:30] WARN: Skipping final node save because override_runlist was given [2014-07-09T12:11:34+05:30] INFO: Chef Run complete in 4.212008 seconds [2014-07-09T12:11:35+05:30] INFO: Running report handlers [2014-07-09T12:11:35+05:30] INFO: Report handlers complete


Sent: Tuesday, 8 July 2014 11:14 PM
Subject: [chef] Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation

Hi Indra,

My example was with regards to the SCEP client installation. Replace the installation command with the silent install command for SQL Server 2008.


On Tue, Jul 8, 2014 at 3:18 AM, Indra k <indra.k <at>> wrote:
Hi Aditya,

                 Have to run those scep code which installs client settings.
I dont understand,need to install scep client and sscm ah what it can do?

          Because my problem is only running sql server silent installation commands it shows access denied error while running from workstation.


Sent: Monday, 7 July 2014 10:36 PM
Subject: [chef] Re: Re: Re: Re: RE: sql server 2008 silent installation

Hi Indra,

I haven't tried the winrs method as the 'scheduled task' way I described above sufficed for us. I'll try the winrs method sometime later and let you know. Meanwhile you can try the scheduled task way as described in my previous example and let me know if that works for you.


On Mon, Jul 7, 2014 at 2:16 AM, Indra k <indra.k <at>> wrote:

      i have tried by giving
winrs.exe -r:"WIN-J34DQLCH" wusa.exe <update> /extract:"C:\"

but it shows the system path  can't specified.

I dont know how to give can u help me in this.


From: Aditya Karanjkar <aditya.karanjkar <at>>
To: Indra k <indra.k <at>>
Cc: "chef <at>" <chef <at>>
Sent: Friday, 4 July 2014 12:12 AM
Subject: [chef] Re: Re: Re: RE: sql server 2008 silent installation


May not be related but I hit the similar (access denied) issues when installing any windows package that might need to install a .msu update as a part of the installation process. And as in your case, it runs perfectly when chef-client is triggered from an administrative command within the node itself. It might be related to the following issue:

I have hit this with SCCM client, SCEP client etc. It's a Windows limitation and Chef cannot do anything about it.

My workaround was to create a scheduled task scheduled to run 'once' and fire it off immediately. I don't think you can use the windows_task resource provided by the windows cookbook as it doesn't accept 'once' as a valid schedule. I used the execute resource with 'schtasks' to do the same. Give it a shot and let me know if it works for you:

execute "Task to install SCEP Client" do
        command "schtasks /create /f /sc once /st #{('%H:%M')} /tn Install_SCEP_Client /tr \"C:\\Windows\\Temp\\Client\\scepinstall.exe #{node['scep_client']['installer_options']}\" /RU #{node['scep_client']['sch_user']} /RP #{node['scep_client']['sch_pass']}"
        action :run
execute "Run SCEP Client installer task" do
        command "schtasks /run /i /tn Install_SCEP_Client"
        action :run

Best Regards,

On Thu, Jul 3, 2014 at 2:10 AM, Indra k <indra.k <at>> wrote:
        i have tried out  by creating a separate account with admin rights also in without admin rights still it shows "access denied"

     Inner exception type: System.Security.Cryptography.CryptographicException
                        Access is denied.

From: Indra k <indra.k <at>>
To: "chef <at>" <chef <at>>
Sent: Friday, 27 June 2014 6:11 PM
Subject: [chef] Re: RE: sql server 2008 silent installation

Thanks for response,

                     Actually my sql server 2008 r2 standard edition cookbook is working fine when i run chef-client from a target node .

                       When i run this as 
knife winrm name:"WIN-DQ00DBBP3I1" 'chef-client' -x administrator -P "password" -a ipaddress

it shows a following error which i sent.

I think also same the problem is in permission,like when i run chef-client in administrator i create another account without have admin rights ,again when i run chef-client from a command prompt not even workstation it shows pemission denied errror to c:/chef/cache

From: Kapil Shardha <Kapil.Shardha <at>>
To: Indra k <indra.k <at>>; "chef <at>" <chef <at>>
Sent: Friday, 27 June 2014 5:26 PM
Subject: [chef] RE: sql server 2008 silent installation

Hi Indra,
I am not sure if I understand your statement :
As it runs and installs successfully from target machine but when i run this from workstation , it shows error’.
What do you mean by running it from workstation? From the SQL summary file, it looks like a permission issue. Please provide some more information on the specific scenario where you experience this issue.
From: Indra k [mailto:indra.k <at>]
Sent: Friday, June 27, 2014 3:19 AM
To: chef <at>
Subject: [chef] sql server 2008 silent installation
          I have done silent installation  for sql server 2008 r2 using cookbook in open source chef .
          As it runs and installs successfully from target machine but when i run this from workstation , it shows error
[2014-06-27T00:06:38-07:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: batch[sql install] (sqlstd::default line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '-2068774911' ---- Begin output of "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" ---- STDOUT: C:\>"C:\Program Files\SQL SERVER 2008 R2\setup.exe"/ConfigurationFile="C:\Program Files (x86)\configuration.ini" The following error occurred: There was an error generating the XML document. Error result: -2068774911 Result facility code: 1201 Result error code: 1 Please review the summary.txt log for further details Microsoft (R) SQL Server 2008 R2 Setup 10.50.1600.01 Copyright (c) Microsoft Corporation.  All rights reserved. STDERR: ---- End output of "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" ---- Ran "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" returned -2068774911
AND MY summary.txt file is :
Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2068774911
  Exit facility code:            1201
  Exit error code:               1
  Exit message:                  There was an error generating the XML document.
  Start time:                    2014-06-27 12:23:25
  End time:                      2014-06-27 12:23:37
  Requested action:              RunRules
Machine Properties:
  Machine name:                  WIN-DQ00DBBP3I1
  Machine processor count:       1
  OS version:                    Windows Server 2008 R2
  OS service pack:               Service Pack 1
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x64
  Process architecture:          32 Bit
  OS clustered:                  No
Package properties:
  Description:                   SQL Server Database Services 2008 R2
  ProductName:                   SQL Server 2008 R2
  Type:                          RTM
  Version:                       10
  SPLevel:                       0
  Installation location:         C:\Program Files\SQL SERVER 2008 R2\x86\setup\
  Installation edition:          DATA_CENTER
User Input Settings:
  ACTION:                        RunRules
  CONFIGURATIONFILE:             C:\Program Files (x86)\configuration.ini
  ENU:                           True
  FARMACCOUNT:                   <empty>
  FARMADMINPORT:                 0
  FARMPASSWORD:                  *****
  HELP:                          False
  INDICATEPROGRESS:              False
  PASSPHRASE:                    *****
  QUIET:                         False
  QUIETSIMPLE:                   True
  RULES:                         GlobalRules
  UIMODE:                        Normal
  X86:                           True
  Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140627_122318\ConfigurationFile.ini
Detailed results:
Rules with failures:
Global rules:
There are no scenario-specific rules.
Rules report file:               The rule result report file is not available.
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException
        There was an error generating the XML document.
      DisableWatson = true
        at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
        at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(Object objectToSerialize)
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveInputSettingValueToObject(InputSettingInfo inputSettingInfo, List`1 values)
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveParsedArgumentsIntoInputSettingStore(InputSettingSource source, Dictionary`2 parsedArguments, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)
        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.ProcessConfigFile(String configFileFullPath, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)
        at Microsoft.SqlServer.Configuration.BootstrapExtension.ProcessConfigFileArguments.ExecuteAction(String actionId)
        at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    Inner exception type: System.InvalidOperationException
                There was an error generating the XML document.
                at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
                at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
                at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)
                at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)
        Inner exception type: System.Security.Cryptography.CryptographicException
                        Access is denied.
                        at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
                        at Microsoft.SqlServer.Common.SqlSecureString.WriteXml(XmlWriter writer)
                        at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable(IXmlSerializable serializable, String name, String ns, Boolean isNullable, Boolean wrapped)
                        at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSqlEngineSetupPublic.Write6_SqlEngineSetupPublic(String n, String ns, SqlEngineSetupPublic o, Boolean isNullable, Boolean needType)
                        at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSqlEngineSetupPublic.Write7_SqlEngineSetupPublic(Object o)

Seth Vargo | 27 Jul 03:33 2014

Chef Sugar v2.1.0

Ohai Chefs!

I just released Chef Sugar v2.1.0

### Improvements
- Add `solaris2?` matcher
- Add `aix?` matcher
- Add 'lxc?' matcher

### Bug Fixes
- Fix a bug in namespace memoization during attribute initialization

This release is fully backwards-compatible.

Keep makin' it sweet!
 <at> sethvargo
Attachment (smime.p7s): application/pkcs7-signature, 6609 bytes
Sheppy Reno | 26 Jul 04:17 2014

Using Tags for Knife Attributes

In our environment, all of the servers live behind a firewall and chef
registers their private IP as the 'IP' attribute of the node.
Unfortunately, our workstations are on a separate network, so we need to
use the external IPs to SSH into the server.  We have been storing the
external IP as a tag attribute and manually running `ssh foo <at>
'sudo chef-client`, but this can be cumbersome when working with
multiple nodes.

I have been trying to get `knife ssh` to read the 'Tags' attribute like

knife ssh name:foo* 'sudo chef-client' -a 'Tags'

The Tags variable appears to be an array, but no amount of fiddling with
the syntax has netted me the results I'm looking for.  I even went so
far as to remove all of the tags except the IP, but that didn't work

Has anyone gotten this to work, and if so what sort of hocus pocus did
you do to create this magic?

Sheppy R
Eric Helgeson | 25 Jul 22:03 2014

Java Cookbook v1.24.0 Released

Ohai Chefs!

We just released an update to the Java Cookbook with lots of the community pull requests merged in.

Also note the maintainer has moved to Agile Orbit.

-Eric Helgeson
Sander van Zoest | 25 Jul 19:39 2014

apache2 cookbook: updated tests, apache 2.4


At OneHealth, we have been running our own fork of the apache2 cookbook in production since last year that added support for Apache 2.4 release and improvements in configuring SSL.

As you may or may not know in early April, my company OneHealth Solutions took over maintenance of the apache2 cookbook. We have a lot of interest in simplifying the cookbook into more of a library cookbook focused on the core apache2 web server as provided by the ASF incorporating their best practices across all platforms.

To incorporate apache 2.4 support required a lot of changes* in the core package itself, but most package builders also took this as a chance to make significant changes to the way the packages are configured and build. On our fork, we were primarily concerned with Ubuntu LTS and less so on other platforms. For the community version, we wanted to make sure we had chefspec and serverspec integration tests in place to ensure we were delivering a quality cookbook that tests beyond our own needs.

Currently, we plan to do one more release with the tests included followed by the release a major version with apache 2.4 support. We would appreciate some feedback on our apache 2.4 work.
Please try out the COOK-3900 branch and file github issues with anything you may find.

You can also find us on if you would like to chat in more real time.

Current thoughts on a road map is as follows:
  • v1.11 - update with latest test framework and minor bug fixes
  • v2.0   - major update with apache 2.4 support
  • v2.1   - minor update with SSL improvements, close out any Opscode JIRA tickets
  • v3 and beyond - splitting out non-standard modules into their own cookbooks, definitions to LWRPs, etc.

We would love to hear your thoughts.


--  Sander
Brian Pitts | 25 Jul 19:01 2014

Web Operations Job at Lonely Planet

Hi all,

I work in web operations for Lonely Planet, and we're looking to add a new member to our team in Nashville, TN, US. We're big users and fans of Chef, so I thought I'd share the position here in case any community members are looking for work.

Our web operations team is responsible for working alongside developers to ensure that can efficiently deliver a stable and fast product to travellers. You might be a good fit if you

* believe infrastructure as code and automation are awesome
* worship highly availability and performant infrastructure
* are Master of the Linux Universe
* know what’s what with AWS
* have experienced the challenges of running web applications at scale
* can’t live without source code management
* feel happiest work closely with devs
* know a bit about Ruby
* perhaps (but not essentially) know your way around Postgres
* can understand technology problems as part of a broader product vision
* have passion for travel and interest in building systems that connect travellers with content and each other.

You can see the full position description and application information at

We're also hiring for Ruby developers in Nashville, London, Melbourne and remote! Every developer gets a knife client and contributes to the cookbooks that support their applications. You can learn more about those positions at

Brian Pitts
Web Operations Engineer