Bryan Baugher | 21 Nov 22:37 2014

Printing command output

Hi everyone,

Whats the easiest way to print command output while its running? I've found older mailing list questions about this and things on SO but they mostly point to setting chef logging to debug which is not what I want. I would like to always print the output for this particular command as it often takes awhile to run and has valuable information.

Jeff Blaine | 21 Nov 22:33 2014

Point of service resource *_command attrs?

I can't figure out what the *_command attributes are actually for.

Setting init_command, start_command ... etc... to a value seems
pointless when the chosen underlying provider has all of its hardcoded
information that it uses.

  service 'foo' do
    init_command '/bin/true'
    start_command '/bin/true'
    action [:enable, :start]

  ==> "unable to locate the init.d script!"

Any ideas?


Jeff Blaine
PGP/GnuPG Key ID: 0x0C8EDD02

Bryan Baugher | 21 Nov 20:39 2014

Push Jobs Questions

Hello everyone,

Is the push jobs code available on github anywhere? Also are there any plans to add a kind of concurrency option (i.e. don't run command X on all nodes at the same time)?

Brad Knowles | 21 Nov 06:53 2014

Windows system standard program for unzip-ing archives?


So, I've been trying to write some cross-platform Chef code for a customer, and one of the things we need to do
is to take a zip archive of a package written in Java, and deploy that.  The zip archive is completely
self-contained, we don't need to install it as an OS-level package or anything -- we just need to un-zip it
into an appropriate directory structure, and then run the appropriate included .sh or .BAT files.

This worked fine on RHEL5.  But I was astonished to find that there is apparently no standard tool to handle
this kind of thing on Win2k3 or Win2k8.

Am I missing something obvious here?  I mean, I can install a package easily enough, but this is a ...
sensitive ... customer, and there might have to be a lengthy delay in getting that approved through the
change control board.

Any and all ideas or thoughts would be appreciated.  Thanks!

Brad Knowles <brad <at>>
LinkedIn Profile: <>

vinod_patil | 21 Nov 06:42 2014

IBM Biginsights 3.0 silent installation using Chef is failing

I am doing silent installation of Biginsights 3.0 using Chef. Strange thing is
that if I invoke the installation without Chef recipe i.e manually
"./ install.xml" it works fine. But when I invoke it through
Chef recipe , it fails. It does not install bigsql1,sheets and due that it
fails. I am pasting the error. It is not getting required files as bigsql1
installation is not completing successfully.

[ERROR] DeployManager - bigsql1 failed initialize failed because
/opt/ibm/biginsights/hdm/components/bigsql1/binary/bigsql1-dist.tar.gz is not

Any help will be appreciated. I am sure somewhere Chef is failing to invoke
bigsql1 install script and most probably it is terminal issue.

Here is my recipe code 

bash "BI3.0" do
user "biadmin"
group "biadmin"
code <<-EOH
sh BI30.xml 2>&1 >> /tmp/console.out

John de la Garza | 20 Nov 21:36 2014


If anyone could make sense of my last post and has a similar issue, I have found
a possible solution:

This has helped me get the knife.rb info into my Vagrant file, without
relying on
a static env variable.  The knife.rb is dynamically changed when I run
chefvm.  This was what I needed.

John de la Garza | 20 Nov 21:15 2014


In my .basrc I have this:  export KNIFE_CHEF_SERVER=,
which is a local chef-zero server

in my .chefvm/configurations/chef-east/knife.rb I have this:
chef_server_url  "", which our production chef

Vagrant seems to rely on KNIFE_CHEF_SERVER from the environment here:
chef.chef_server_url = ENV['KNIFE_CHEF_SERVER']

So when I run 'chefvm use <some other server>' it sets up the chef_server_url
from the .chefvm/configurations/chef-east/knife.rb correctly but the
env var: KNIFE_CHEF_SERVER, stays the same

Am I doing something wrong here?  I would have thought vagrant would have
used the chef_server_url setting  in the

Right now when I run chefvm use <some_server>, I have to manually change
the KNIFE_CHEF_SERVER env var.

Simon Detheridge | 20 Nov 18:08 2014

How do I change 'interval' and 'splay' using chef-dk on Windows

So, I'm bootstrapping a Windows node with 'knife bootstrap windows' using chef-dk

Chef is using the windows_service init recipe. I've set chef_client/interval and chef_client/splay as
default attributes.

I can't find how to apply these to the Windows service. As far as I can tell, the service is looking at
c:\chef\client.rb for its settings. However, if I ensure these are written into a file in client.d, Bad
Things happen when I run chef-client::config because my bootstrapping chef decides it's going to act
like a daemon and never terminates once the chef run finishes.

If I skip running the config recipe, the setting is ignored because a client.rb isn't written that includes
stuff in client.d. If I manually write out a new client.rb using a different cookbook (probably not
recommended) there's no way to restart the chef service to reload it. (It doesn't support restart. Can't
use net stop/start as it waits for the bootstrapping chef to exit before stopping, so there's no way to
restart it again.)

Am I missing a trick, somewhere?



Simon Detheridge - CTO, Widgit Software
26 Queen Street, Cubbington, CV32 7NA - Tel: +44 (0)1926 333680

John de la Garza | 20 Nov 17:47 2014

uploading environments

When reading the docs on how to upload environments, I am seeing two ways.

1. knife upload environments
2. knife environment from file environments/*.json

Is there a reason to use one way over the other?

Fouts, Chris | 20 Nov 16:34 2014

Chef 12 cert keys

In Chef 11 I followed these to setup keys between my Chef server and workstation.


Seems like everything changed for Chef 12. Where are corresponding instruction to setup up a chef workstation to talk to a Chef 12 server?



koteswara rao Sakhamuri | 20 Nov 11:30 2014

Issue with datadog mysql

Hi Chefs,
I'm facing issue with mysql in datadog. Please help me to find out the solution. Am i doing anything wrong? od do i have to include the information of DB like database credentials etc.

======================================================== NoMethodError ------------- undefined method `[]' for nil:NilClass Cookbook Trace: ---------------   /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:24:in `block in from_file'   /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:23:in `from_file'   /var/chef/cache/cookbooks/keas-datadog/recipes/mysql.rb:3:in `from_file'   /var/chef/cache/cookbooks/keas-percona/recipes/default.rb:19:in `from_file' Relevant File Content: ---------------------- /var/chef/cache/cookbooks/datadog/recipes/mysql.rb:  17:  #       "replication: 0",  18:  #       "galera_cluster: 1"  19:  #     ]  20:  #   },  21:  # ]  22:  23:  datadog_monitor 'mysql' do  24>>   instances node['datadog']['mysql']['instances']  25:  end  26:  27:  28: Running handlers: [2014-11-20T15:50:04+05:30] ERROR: Running exception handlers Running handlers complete [2014-11-20T15:50:04+05:30] ERROR: Exception handlers complete [2014-11-20T15:50:04+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out Chef Client failed. 0 resources updated in 2.890363666 seconds [2014-11-20T15:50:04+05:30] ERROR: undefined method `[]' for nil:NilClass [2014-11-20T15:50:04+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsucce
sfully (exit code 1)