Chef 0.10.10 released!

We have another epic Chef release ready for you with over 120 closed tickets.

The default bootstrap template for knife has changed in this release. If you haven’t been specifying a template with the “-d” flag, you’ve been using the “ubuntu10.04-gems” template. As of this release you will need to specify this template with “-d ubuntu10.04-gems” because the new default is the “chef-full” template. This will install using the Omnibus installer which is still in beta but will be released and formally announced soon. Laradji Nacer provided a new “ubuntu12.04-gems” template in this release for Ubuntu Precise that uses RubyGems 1.8.15 that ships with the distribution rather than installing it from source.

This release contains an important new provider for those using RubyGems to extend their Chef recipes. In the past you had to do a bit of a trick to install a gem and use it in a recipe, but this is done for you by the new chef_gem provider. It is now as simple as:

[sourcecode gutter=”false”]
chef_gem "mysql"

require ‘mysql’
# Do something cool and useful with the gem in your recipe

While this is much more convenient, this also makes your intention more clear. When you want to use a Gem in a Chef recipe, use ‘chef_gem’ and when you want to install a Gem to your system, use the traditional ‘gem_package’ provider. The ‘gem_package’ provider now also detects if you’re running under an Omnibus install and will search the system for a Ruby to install the Gem to. Otherwise it works the same as it has in the past and will use the Gem installation belonging to the Ruby that you’re running Chef in unless you specify otherwise.

You may have seen our new library Mixlib-ShellOut for running system commands showing up more, and it makes a grand appearance in this release. As it turns out, running commands on the system in every possible scenario is quite difficult and we’ve resolved a great deal of them in ShellOut.From here forward all new features running commands will be expected to run under ShellOut and we’re migrating the deprecated uses of run_command that remain. In the interim, this release contains a workaround for some segfault problems under run_command.

For contributors, the rspec tests are also greatly improved, with better multi-platform support. Running ‘rake spec’ in chef/ will now run both the unit and functional rspec tests. You probably will need to use bundler and ‘bundle exec rake spec’ to stay within a good set of RubyGems.

We also added functionality for supporting platform specific resources rather than overloading resources with options that only apply to a single platform. We’re not using this feature yet though, so stay tuned for more information.

This release adds full support for Windows ACLs and inheritance of file permissions.

We’ve got a pair of co-MVPs for you this time, Juanje Ojeda and Igor Afonov. These two made some great contributions and we really appreciate their dedication. This release also saw strong contributions from past MVP recipients Akzhan Abdulin, Laurent Désarmes, Matthew Kent, and Tommy Bishop.

That’s for everything folks, and hopefully we’ll see you at ChefConf.


Juanje Ojeda removed the json_class requirement from parts of knife improving support for reading in JSON and added a check to ensure RunListItems were passed correctly. He also improved ‘knife node run_list’ add and remove to allow removing multiple run list items with one command, improved the FileEdit utility class, and fixed the prettyprint formatter when using ‘knife role’.

Igor Afonov added a launchctl service provider for Mac OS X, fixed a file permission inconsistency between the deploy and deploy_revision providers, fixed rollback for the revision and timestamp based deploy provider and made knife work with data bags named help. He also added support for using gem comparison operators when specifying gem package versions. With the help of Alex Tomlins he added support for arbitrary environment variables to the cron provider.

Akzhan Abdulin fixed an issue when reading knife ec2 configuration values, added remote_file support for HTTP 303, helped improve some documentation, added the ability for the git provider to update submodules and updated the rspec requirements. He also update the regular expressions to escape any variables that they contained.

Tommy Bishop added a warning for low values of Solr maxFieldLength to help warn people about CHEF-2346. He also fixed a missing requirement issue when running ‘knife cookbook site download’ on a 64-bit system and added spec tests for ‘knife cookbook list’ and made the timeout for a not_if on an execute resource not stop the run.

Matthew Kent made some improvements to the DeepMerge feature, prevented knife from changing a cookbook version when it fails, fixed a bug in the upgrade action for the package provider, and fixed an issue preventing –freeze to be used on cookbook upload. He also fixed the dpkg provider for source files with a ‘.’ in their name, updated the RubyGems provider to use Gem::Specification and improved the debugging information on the yum provider.

Laurent Désarmes, Max Horbul, and Mike Glenn all helped to improve the user resource when dealing with home directories that have extraneous characters.

Laurent Désarmes also fixed a similar bug with the mount provider when using NFS shares and fixed the remote_directory purge option when the directory is not empty.

Max Horbul fixed knife cookbook site install with paths with special characters and added the ability to upload all data bags at once.

Oleksiy Kovyrin made many improvements to the route provider; he fixed the delete action and the use of route files on Redhat and Fedora.

Chris Roberts added a -o and –override-runlist flag to the chef-client that lets you run with a different run_list for a single run.

Victor Lowther fixed knife to run when HOME is not set.

Eric Hankins added a -j flag to knife bootstrap for passing json data to the initial chef-client run.

Hector Castro improved the mdadm resource to support write-intent bitmaps and Mitchell Hashimoto added metadata version support to the mdadm resource.

Philip (flip) Kromer fixed a bug when capturing line numbers in erubis templates.

Mike Adolphs helped fix knife cookbook site install when providing a specific version.

Roberto C. Morano fixed the gpasswd provider handling of empty groups.

John Goulah added the ability to reload a recipe in ‘shef’ using ‘reload_recipe’.

Guilhem Lettron improved the upstart provider to support parameters.

Nicolas Vinot improved knife to allow it to get its configuration from a KNIFE_HOME variable.

Sebastian Boehm improved the group provider to support system groups on most platforms.

Trevor Orsztynowicz added SmartOS support.

Roland Moriz added Linaro support.

Andrea Campi fixed the FreeBSD service provider for certain edge cases where the state was already what was desired.

Prashant Srivastava fixed create_on_missing for the remote_directory resource.

Douglas Thrift fixed the gem_package provider when using a gem file and an alternate gem_binary.

Joshua Buysse made it so ‘cookbook’ and ‘cookbook::default’ are recognized as the same recipe.

Andrew Fecheyr Lippens fixed the git resource when using paths with special characters.

Markus Schirp fixed the pacman provider to support UTF-8.

JP Sullivan fixed a bug related to cookbook versions greater than 11

Max Rabin and Hippie Hacker made it so you could set an ssh_attribute value for knife ssh in your config.

Vladimir Girnet updated the centos5-gems bootstrap template to account for a hostname change of the EPEL repository.

John E. Vincent improved knife ssh by making it only use the provided ssh key if you specify one.

David Calavera updated calls to ShellOut to use the proper options for the new library and improved the portage provider.

Alex Tomlins fixed a bug preventing the cron provider from enabling a disabled entry.

Dimitri Aivaliotis fixed using the FreeBSD package provider for binary packages without ports.

Alex Howells fixed the handling of symbolic links by remote_directory.

Rob Di Marco added the ability to specify the location of the chef-client when bootstrapping a node with ‘chef_client_path’.

Devin Ben-Hur improved the #ord method for Rubies prior to 1.9.

Michael Leinartas added a ‘run’ command to the init scripts to trigger a chef-client run and fixed loading LWRPs from cookbooks with a hypen in their name.

Geoff Papilion helped resolve an issue where using invoke-rc.d to start a service might make it silently not start.

Avishai Ish-Shalom added support for a default action for LWRPs.

Thom May fixed the gem_package provider when installing to JRuby.

Augusto Becciu made notifications work when defined inside a ruby_block and added support for an ssh gateway for knife bootstrap and knife ssh.

Ondřej Kudlík added support for installing packages from a different release with the apt provider and John Sumsion contributed tests.

Karel Minarik made shef run without an fqdn.

Marius Ducea fixed a bug when mounting tmpfs with the mount provider.

Jamie Winsor added a default value for Chef::Config[:data_bag_path].

Aaron Suggs fixed a require problem when using Chef::Rest.

Andrew Grangaard and Grant Hutchins provided some always appreciated spelling fixes.

Release Notes


  • [CHEF-1202] – Update regular expression placeholders to quote substituted values.
  • [CHEF-1251] – FreeBSD package provider should not need the port tree to handle binary packages
  • [CHEF-1398] – Run List Item regex is too lenient, creating bizarre invalid item names
  • [CHEF-1547] – Apt provider can't install packages from different default release
  • [CHEF-1657] – mount provider fails to mount tmpfs
  • [CHEF-1681] – cron provider on ubuntu won't renable a commented out cron job
  • [CHEF-1686] – cookbook_file on Windows does not inherit DACLs
  • [CHEF-1736] – Chef client cannot daemonize on Windows
  • [CHEF-1747] – Cookbook version 11.0.0 and such cause troubles
  • [CHEF-1816] – Timestamp deploy provider rollback doesn't work
  • [CHEF-1827] – Git provider should recursively update/init submodules
  • [CHEF-1902] – Line number from erubis exception read incorrectly
  • [CHEF-1917] – Resource references in notifications are not resolved when the resource is declared in a ruby block
  • [CHEF-2012] – Misleading error messages on application initialize errors
  • [CHEF-2068] – remote_file fails on a HTTP response "303 See Other"
  • [CHEF-2328] – RubyGems 1.8 Gives deprecation messages
  • [CHEF-2352] – knife node from file fails with NoMethodError exception for undefined method 'save'
  • [CHEF-2443] – gem_package for jruby breaks unless a version is specified
  • [CHEF-2454] – Fatal error loading LWRP when cookbook name contains hyphen
  • [CHEF-2488] – Dpkg provider doesn't properly detect packages with a '.' in their name
  • [CHEF-2512] – `knife cookbook site install` with specific version fails
  • [CHEF-2543] – knife cookbook upload -d will re-upload a cookbook if it is a chain dependency
  • [CHEF-2566] – knife cookbook site install (and possibly other commands) does not gracefully handle paths with spaces
  • [CHEF-2598] – create_on_missing does not work with remote directory resource
  • [CHEF-2599] – remote_directory fails trying to purge a non-empty directory
  • [CHEF-2633] – Template, Directory, and possibly other resources fail when attempting to set user or group on Windows.
  • [CHEF-2641] – knife not respecting options that begin with "–no-"
  • [CHEF-2646] – knife dies badly if the HOME environment variable is not set
  • [CHEF-2681] – Chef::Cookbook::SyntaxCheck assumes ruby would be in the PATH
  • [CHEF-2689] – Can not detect oracle server linux platform during chef installation
  • [CHEF-2690] – :timeout option for not_if stops entire chef run rather than triggering "execute" command
  • [CHEF-2697] – No default providers set for Linux Mint
  • [CHEF-2698] – Chef should support platform-specific resources
  • [CHEF-2704] – Knife Bootstrap manpage statement about build-essentials is wrong for current apt-packages
  • [CHEF-2705] – knife[:ssh_attribute] is ignored
  • [CHEF-2716] – package provider – on upgrade, no check for candidate is nil
  • [CHEF-2723] – Revision based deploy provider rollback doesn't work
  • [CHEF-2744] – "knife role show" NoMethodError for PrettyPrinter format, –format pp or -Fp
  • [CHEF-2747] – remote_directory and symbolic links
  • [CHEF-2751] – Fix spelling of "revision" from "revison"
  • [CHEF-2759] – uninitialized constant Chef::DataBagItem when trying to show databag named "help"
  • [CHEF-2773] – single quotes in git commit cause 'knife cookbook site install' to fail on windows
  • [CHEF-2778] – Knife only requests the latest cookbook from the server when ensuring that dependent cookbooks are available
  • [CHEF-2781] – 409 error when trying to upload any cookbook with '–freeze' option
  • [CHEF-2786] – create (and use) Chef::Config[:file_cache_path] in chef-solo
  • [CHEF-2796] – Shef fails when "node.fqdn" is not set
  • [CHEF-2801] – Knife bumps the cookbook version in environment even there was an error while uploading
  • [CHEF-2811] – svn provider doesn't work with new ruby YAML engine
  • [CHEF-2830] – During the Instance creationg on Amazon EC2 chef returned an unknown error during executing the knife receipy.
  • [CHEF-2833] – Portage package provider doesn't behave as it should
  • [CHEF-2835] – Chef does not honor custom gem options set in system-wide gemrc
  • [CHEF-2836] – Chef master doesn't work with mixlib-shellout because the log keys have changes
  • [CHEF-2843] – Failed test in mixlib-authentication
  • [CHEF-2844] – monkey-patch of Ruby stdlib String to add the instance method #ord is broken
  • [CHEF-2846] – Knife SSH does not use ssh_attribute from Knife Config
  • [CHEF-2849] – pacman package provider does not handle utf-8 input
  • [CHEF-2852] – can't modify frozen string
  • [CHEF-2856] – gpasswd provider does not handle empty groups
  • [CHEF-2860] – Add default value for Chef::Config[:data_bag_path]
  • [CHEF-2863] – knife bootstrap (APT distro) fails if wget not installed
  • [CHEF-2869] – knife cookbook syntax checks fail under omnibus with no system ruby
  • [CHEF-2872] – Compressed body is not uncompressed when a non-success HTTP response is returned
  • [CHEF-2883] – regression: moneta: undefined local variable or method 'file'
  • [CHEF-2894] – Chef::Cookbook::Metadata initialize method hardcodes license as Apache v2.0
  • [CHEF-2896] – Shef's become_node fails with " HTTP Request Returned 400 Bad Request: Missing param: run_list"
  • [CHEF-2899] – Ensure JSON representation of nodes and roles is not changed by the use of the ActiveSupport gem.
  • [CHEF-2904] – Fix undefined Chef::Log when using Chef::REST
  • [CHEF-2916] – Segmentation fault on Ruby 1.8 in popen4 due to GC while
  • [CHEF-2917] – privileges misspelled in chef/lib/chef/daemon.rb
  • [CHEF-2919] – knife (Chef 0.10.8) – downloading / installing XXXXXX cookbook fails on CentOS 5.7 64-bit. CentOS 5.7 32-Bit install works.
  • [CHEF-2941] – windows service provider fails with 'NameError: wrong constant name ShellOut' when given external commands for start/stop/restart
  • [CHEF-2956] – Update gemspec to use latest RSpec
  • [CHEF-2958] – gem_package install fails when gem_binary is specified and source is a local file
  • [CHEF-2964] – FreeBSD service provider is too sensitive to the current state
  • [CHEF-2967] – Git clone should escape destination
  • [CHEF-2970] – include_recipe considers cookbook and cookbook::default as distinct recipes
  • [CHEF-2972] – EPEL repository hostname changed, need to adjust centos5-gems bootstrap script
  • [CHEF-3003] – Route provider does not create route files on redhat and fedora
  • [CHEF-3008] – Route provider does not save all defined routes in redhat route configs
  • [CHEF-3010] – The deploy and deploy_revision resources have inconsistent behavior
  • [CHEF-3014] – rspec 2.9.0 breaks cookbook metadata tests
  • [CHEF-3027] – knife output formatting of columns needs to be narrower
  • [CHEF-3052] – knife node edit will create a new node when the name is changed
  • [CHEF-3054] – Route provider route deletion action does not work
  • [CHEF-3076] – blows up when @current_user does not exist and does not have #home (bug was introduced by CHEF-3033)
  • [CHEF-3078] – Exception when running without HOME set on non-windows platform
  • [CHEF-3081] – notify always triggers installing older version of gem with gem_package
  • [CHEF-3082] – Creating user with no home directory set fails
  • [CHEF-3090] – Chef::Mixin::ShellOut should have compatibility layer


  • [CHEF-1408] – Gem Package Provider should support gem comparison operators to specify the version to install
  • [CHEF-1896] – Support for ssh gateway in knife ssh and knife bootstrap
  • [CHEF-2186] – Chef::Rest should ask the server to gzip the response
  • [CHEF-2317] – default path values (chef-client, chef-solo and Chef::Config) should adjust for windows platform
  • [CHEF-2550] – yum provider – report on source repository
  • [CHEF-2715] – Provide alternate chef-client location when bootstraping
  • [CHEF-2740] – Add new public method to file_edit.rb to append a line if the regex doesn't match
  • [CHEF-2818] – cleanup DeepMerge usage and features
  • [CHEF-2828] – Add "commonly expected" aliases for resource attributes
  • [CHEF-2841] – Include libselinux-ruby in omnibus build
  • [CHEF-2859] – Missing spec for knife cookbook list
  • [CHEF-2927] – Log a warning if maxFieldLength is set to <= 10,000 in solrconfig.xml
  • [CHEF-2935] – mdadm should support argument to change metadata version
  • [CHEF-2968] – 'knife node run_list add' should take a list of RunListItems
  • [CHEF-2971] – Force Chef::Knife::SSH to use the net-ssh 'keys_only' option when identity file is passed
  • [CHEF-3025] – knife bootstrap command should accept JSON params to be added to first_boot.json
  • [CHEF-3033] – user resource : home attribute with trailing slash
  • [CHEF-3036] – System groups should be supported on Debian/Ubuntu
  • [CHEF-3044] – Using KNIFE_HOME env to allow multiple knives on same machine
  • [CHEF-3060] – mount provider should ignore trailing slash for network fs_spec
  • [CHEF-3063] – Bootstrap script for Ubuntu 12.04 LTS
  • [CHEF-3067] – mdadm should support argument to supply a write-intent bitmap

New Feature

  • [CHEF-1700] – Service Provider for Mac OS X
  • [CHEF-1789] – LWRP resource should be able to specify the default action for a resource
  • [CHEF-1912] – As a chef user I want to load all my data bags and items from files with one command
  • [CHEF-2745] – cron resource should be able to take an attribute of arbitrary ENV settings
  • [CHEF-2779] – Knife cookbook dependency check on upload needs more logging
  • [CHEF-2815] – Create "knife bootstrap" template for omnibus built full-stack installer
  • [CHEF-2879] – Create resource for installing gems for use in Chef recipes
  • [CHEF-2880] – Warn if invoke-rc.d is not going to start a service when we ask it to
  • [CHEF-2881] – Chef-client init scripts should have a target which triggers a chef run with SIGUSR1
  • [CHEF-2922] – ability to reload a recipe, for use in shef
  • [CHEF-2976] – 'knife node run_list remove' should be able of removing a list of item from the run list
  • [CHEF-2988] – Run List Modifiers
  • [CHEF-2989] – SmartOS Support in Chef
  • [CHEF-3032] – Support the Linaro Distribution (an Ubuntu fork/incubator-branch for ARM SoC)
  • [CHEF-3048] – add parameters to service resource


  • [CHEF-3020] – rspec spec should work by default
  • [CHEF-3034] – Minor update of README's
  • [CHEF-3055] – Switch gem_package hack for Omnibus from /opt/opscode to /opt/chef

Bryan McLellan